:root { --paper: #f0f0ec; --card: #fff; --ink: #141410; --muted: #6a6a62; --line: #e2e2db; --green: #6bc23c; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 17px/1.6 "Montserrat", -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 24px; }
header { display: flex; align-items: center; gap: 12px; padding: 24px 0; }
header img { width: 40px; height: 40px; border-radius: 10px; }
header .name { font-weight: 800; font-size: 20px; text-decoration: none; margin-right: auto; }
header nav { order: 3; }
header nav a { margin-left: 20px; font-weight: 600; font-size: 15px; text-decoration: none; color: var(--muted); }
header nav a:hover { color: var(--ink); }
/* The menu button exists for phones only; see below. */
.menu-toggle { display: none; }
/* A short band, not a poster: the headline on one line, what it means under it, the
   button beside them — so the first screen belongs to the pictures of the app. */
.hero { display: grid; grid-template-columns: 1fr auto; column-gap: 40px; align-items: center; padding: 20px 0 8px; }
.hero h1 { grid-column: 1; font-size: clamp(34px, 4.2vw, 54px); line-height: 1; letter-spacing: -0.03em; font-weight: 800; margin: 0 0 12px; }
.hero h1 br { display: none; }
.hero p { grid-column: 1; font-size: 17px; line-height: 1.55; color: var(--muted); max-width: 640px; margin: 0; }
.hero .button { grid-column: 2; grid-row: 1 / span 2; align-self: center; white-space: nowrap; }
.button { display: inline-block; background: var(--ink); color: #fff; font-weight: 800; text-decoration: none; padding: 16px 28px; border-radius: 999px; }
/* Always one row: the line through the pictures only makes sense along a row, so
   they never wrap. Wide screens get all four, wider than the text column so the
   screens are big enough to read; narrower ones swipe through them instead. */
/* Sized by the window's height as well as its width: four pictures, 1.64 times as tall
   as wide, plus their captions, fit under the header and the band above — none of them
   cut off at the bottom of the first screen. */
.shots {
  --row: min(1280px, calc(100vw - 48px), max(720px, calc((100vh - 370px) * 2.435 + 60px)));
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 24px 0 56px; position: relative;
  width: var(--row); margin-left: calc(50% - var(--row) / 2);
}
/* A hairline round each picture: the light ones are the page's own colour, and
   without it they read as smaller than the dark ones beside them. */
.shots figure { margin: 0; min-width: 0; }
.shots img { width: 100%; border-radius: 28px; display: block; position: relative; z-index: 1; box-shadow: 0 0 0 1px var(--line); }
/* What each picture shows, said by the page rather than drawn into the picture — in the
   page's language, and small enough to leave the room to the app. */
.shots figcaption { margin-top: 14px; font-size: 14px; line-height: 1.45; color: var(--muted); text-align: center; padding: 0 6px; text-wrap: balance; }
.shots figcaption b { display: block; color: var(--ink); font-size: 17px; font-weight: 800; margin-bottom: 2px; }
/* The pieces of the spending line between the pictures and out to the edges, behind them — see the script on the page. */
.thread { position: absolute; left: 0; top: 0; width: 100%; height: 40px; z-index: 0; pointer-events: none; overflow: visible; }
@media (max-width: 900px) {
  .shots {
    display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    width: auto; margin: 0 -24px; padding: 8px 24px 48px;
  }
  .shots figure { flex: 0 0 44%; scroll-snap-align: center; }
}
.points { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; padding-bottom: 56px; }
.points div { background: var(--card); border-radius: 26px; padding: 24px; }
.points h3 { margin: 0 0 6px; font-weight: 800; font-size: 18px; }
.points p { margin: 0; color: var(--muted); font-size: 15px; }
article { background: var(--card); border-radius: 34px; padding: 40px; margin: 24px 0 56px; }
article h1 { font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; margin: 0 0 8px; }
article h2 { font-size: 22px; font-weight: 800; margin: 36px 0 8px; }
article .date { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
article li { margin-bottom: 6px; }
article h3 { font-size: 17px; font-weight: 800; margin: 22px 0 4px; }
/* The language, as a two-way switch: the one in use is the filled half. */
.switch { display: inline-flex; background: #e6e6df; border-radius: 999px; padding: 3px; }
.switch a { padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; text-decoration: none; color: var(--muted); }
.switch a.on { background: var(--ink); color: #fff; }
article table { border-collapse: collapse; width: 100%; font-size: 15px; }
article th, article td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-top: 1px solid var(--line); }
article th { color: var(--muted); font-weight: 600; }
footer { border-top: 1px solid var(--line); padding: 28px 0 48px; color: var(--muted); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 20px; }
footer a { text-decoration: none; }
footer span { margin-right: auto; }
html, body { overflow-x: hidden; }
img { max-width: 100%; }
article { overflow-wrap: anywhere; }

/* Phones: the menu under the name, the screenshots as a row to swipe through,
   the table as a card per row — nothing wider than the screen. */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  /* No room for the links beside the name: they fold into a menu behind a button
     at the top right edge, dropping down under it. */
  header { position: relative; padding: 16px 0 8px; gap: 10px; }
  header img { width: 34px; height: 34px; }
  .menu-toggle {
    display: grid; place-items: center; order: 4; width: 42px; height: 42px; padding: 0;
    border: 0; border-radius: 999px; background: #e6e6df; color: var(--ink); cursor: pointer;
  }
  .menu-toggle span, .menu-toggle span::before, .menu-toggle span::after {
    display: block; width: 16px; height: 2px; border-radius: 2px; background: currentColor; position: relative;
  }
  .menu-toggle span::before, .menu-toggle span::after { content: ""; position: absolute; left: 0; }
  .menu-toggle span::before { top: -5px; }
  .menu-toggle span::after { top: 5px; }
  header.open .menu-toggle { background: var(--ink); color: #fff; }
  header nav {
    display: none; position: absolute; right: 0; top: calc(100% + 4px); z-index: 10; min-width: 200px;
    flex-direction: column; background: var(--card); border-radius: 18px; padding: 8px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);
  }
  header.open nav { display: flex; }
  header nav a { margin: 0; padding: 12px 14px; border-radius: 12px; font-size: 15px; color: var(--ink); }
  header nav a:active { background: var(--paper); }
  /* Small enough that the pictures of the app start on the first screen. */
  .hero { display: block; padding: 16px 0 16px; }
  .hero h1 { font-size: 32px; margin-bottom: 12px; }
  .hero h1 br { display: none; }
  .hero p { font-size: 15px; line-height: 1.5; margin-bottom: 18px; }
  .button { display: inline-block; padding: 12px 22px; font-size: 15px; }
  /* Most of the screen each, big enough to read the app in, with the next one
     peeking in to say the row goes on. */
  .shots {
    display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
    margin: 0 -16px; padding: 8px 16px 40px; scroll-padding: 0 16px; -webkit-overflow-scrolling: touch;
  }
  .shots figure { flex: 0 0 64%; scroll-snap-align: start; }
  .shots img { border-radius: 16px; }
  .shots figcaption { font-size: 12px; margin-top: 10px; }
  .shots figcaption b { font-size: 14px; }
  .points { gap: 12px; padding-bottom: 40px; }
  .points div { padding: 20px; border-radius: 22px; }
  article { padding: 22px 18px; border-radius: 24px; margin: 8px 0 40px; }
  article h1 { font-size: 32px; }
  article h2 { font-size: 20px; margin-top: 28px; }
  article ul { padding-left: 20px; }
  article table, article tbody, article tr, article td { display: block; width: 100%; }
  article tr:first-child { display: none; }
  article tr { border-top: 1px solid var(--line); padding: 12px 0; }
  article td { border: 0; padding: 2px 0; }
  article td:first-child { font-weight: 800; }
  article td:nth-child(2)::before { content: "Навіщо: "; color: var(--muted); }
  article td:nth-child(3)::before { content: "Де: "; color: var(--muted); }
  html[lang="en"] article td:nth-child(2)::before { content: "Why: "; }
  html[lang="en"] article td:nth-child(3)::before { content: "Where: "; }
  footer { flex-direction: column; gap: 10px; }
}
