/* The plain pages: comparisons, guides, blog posts, the press kit, the legal
   texts. One column of text in the middle of the window, ink on the page
   colour, with the rules, the weights and the flat shadows of the home page.
   Loaded after base.css. Everything is measured from the start of the line,
   so the pages in Arabic and Hebrew need no rules of their own. */

.doc {
  --lp: clamp(20px, 3.2vw, 56px);
  /* The width of a phone with a capture in it (see .doc-phone). */
  --phone: 270px;
  position: relative;
  /* A short page still fills most of the window, so the footer is not in the middle of it. */
  min-height: 56vh;
  /* The column is --measure wide and stands in the middle. The rule above it
     still runs from edge to edge. */
  padding: clamp(34px, 5vw, 72px) max(var(--lp), calc((100% - var(--measure)) / 2)) clamp(52px, 7vw, 104px);
  border-top: 2px solid var(--ink);
  overflow-wrap: break-word;
}

/* ------------------------------------------------------------- the head */

.doc-head { margin-bottom: clamp(26px, 3.6vw, 48px); }
.doc-kicker { margin-bottom: 14px; font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.doc h1 {
  font-size: clamp(32px, 4.6vw, 56px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1;
  text-wrap: balance;
}
.doc-lede {
  max-width: 34em;
  margin-top: clamp(16px, 2vw, 26px);
  font-size: clamp(18px, 1.55vw, 21px);
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.38;
}
/* A line of small print: under a title, beside a button. And the line with
   the date and the reading time. */
.doc-fine, .doc-meta { font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em; }
.doc-head > .doc-fine, .doc h1 + .doc-fine, .doc-head > .doc-meta { margin-top: 12px; }
.doc-lede a, .doc-fine a, .doc-note a { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.doc-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 22px; }
/* What the App Store says about the app: a quiet line of its own under the
   button that closes a page. The shorter form on a phone. */
.doc-end .doc-proof, .doc-head .doc-proof { margin-top: 14px; font-size: 14px; font-weight: 600; opacity: 0.62; }
.doc-proof .proof-short { display: none; }
@media (max-width: 560px) {
  .doc-proof .proof-long { display: none; }
  .doc-proof .proof-short { display: inline; }
}
/* A title with something at the far end of its row (the link to the feed, a
   copy button), and a row of things that belong together. */
.doc-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 24px; }
.doc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.doc-head > .doc-tag + h1 { margin-top: 14px; }
/* A page without a head of its own (the legal texts): the text follows the title. */
.doc > h1 + .doc-body, .doc > .doc-fine + .doc-body { margin-top: clamp(26px, 3.6vw, 48px); }
.doc-back { display: inline-block; margin-bottom: 20px; font-size: 15px; font-weight: 700; text-decoration: none; }
.doc-back:hover { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.doc-rss, .doc-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 11px;
  border: 2px solid var(--ink);
  border-radius: 9px;
  background: none;
  color: inherit;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.005em;
  text-decoration: none;
  cursor: pointer;
}
.doc-rss:hover, .doc-copy:hover, .doc-copy.done { background: var(--mint); }
.doc-icon { flex: none; width: 64px; height: 64px; border-radius: 16px; }

/* A small phone and a language of long words: the word is divided the way
   the language does it instead of being cut where the line ends. */
@media (max-width: 420px) {
  .doc :is(h1, h2, h3):not(:lang(en)) { -webkit-hyphens: auto; hyphens: auto; -webkit-hyphenate-limit-before: 5; -webkit-hyphenate-limit-after: 5; hyphenate-limit-chars: 10 5 5; }
}
/* A heading is set tight for DM Sans. Scripts with marks above and below the
   line (Arabic, Hebrew, Devanagari) and the full-height signs of Chinese,
   Japanese and Korean need more room between two lines, or the marks of one
   line touch the next. Cyrillic and Greek in the system font need a little
   more. This holds for every heading, also those that set a line height of
   their own further down. */
.doc :is(h1, h2, h3, summary):is(:lang(ar), :lang(he), :lang(hi), :lang(ja), :lang(ko), :lang(zh)) { line-height: 1.32 !important; }
.doc :is(h1, h2, h3):is(:lang(ru), :lang(uk), :lang(bg), :lang(sr), :lang(el)) { line-height: 1.14 !important; }
/* A Japanese heading: its lines end between two phrases, which the build and
   Phrases.tsx mark with <wbr>, and nowhere else, or a line of a short heading
   ends in the middle of a word ("デスク" / "トップ"). Only where the marks
   are: without them the heading could not be divided at all. */
.doc :is(h1, h2, h3, summary, .doc-pager a):lang(ja):has(wbr) { word-break: keep-all; }
/* A date in Latin letters inside a line that runs from right to left keeps
   its own order ("12 June 2026", not "June 2026 12"). */
.doc time { unicode-bidi: plaintext; }

/* ------------------------------------------------------------- the text */

.doc-body { font-size: 17px; line-height: 1.55; }
.doc-body > :first-child, .doc-body > section:first-child > h2:first-child { margin-top: 0; }
.doc-body h2 {
  margin: 1.7em 0 0;
  padding-top: 0.75em;
  border-top: 1.5px solid var(--ink);
  font-size: clamp(24px, 2.5vw, 33px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.06;
  text-wrap: balance;
}
.doc-body h3 { margin: 1.5em 0 0; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.doc-body h4 { margin: 1.4em 0 0; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.3; }
.doc-body p { margin-top: 0.8em; }
.doc-body ul, .doc-body ol { margin: 0.8em 0 0; padding-inline-start: 1.25em; }
.doc-body li { margin-top: 0.4em; }
.doc-body li::marker { font-weight: 800; }
.doc-body strong { font-weight: 800; }
.doc-body a { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.doc-body a:hover { background: var(--mint); }
.doc-body code {
  padding: 1px 6px;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  margin-inline: 2px;
  font: 600 0.86em/1.3 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.doc-note { font-size: 14.5px; font-weight: 500; line-height: 1.45; }
.doc-facts { font-size: 15.5px; line-height: 1.5; }
.doc-dim { font-size: 0.74em; font-weight: 600; letter-spacing: 0; opacity: 0.62; }
/* A word the page wants seen: a stroke of the mint marker under it. */
.doc-mark { font-weight: 800; background: linear-gradient(transparent 58%, var(--mint) 58%, var(--mint) 94%, transparent 94%); }

/* -------------------------------------------------------------- tables */

.doc-scroll { margin-top: 1.1em; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15.5px; font-weight: 500; line-height: 1.3; }
.doc th, .doc td { padding: 9px 14px 9px 0; border-top: 1.5px solid var(--ink); text-align: start; vertical-align: top; text-wrap: balance; }
[dir="rtl"] .doc th, [dir="rtl"] .doc td { padding: 9px 0 9px 14px; }
/* The names of the columns stand on one line, whatever wraps under them. */
.doc thead th { padding-top: 0; border-top: 0; font-weight: 800; vertical-align: top; }
/* A table that ends a section leaves the closing rule to the next heading. */
.doc-scroll:has(+ h2) tbody tr:last-child td { border-bottom: 0; }
.doc tbody tr:last-child td { border-bottom: 1.5px solid var(--ink); }
.doc td:first-child { font-weight: 700; }
/* Yes, no and partly in the comparison tables: a mark in a circle. A mark with
   a note ("only in its own browser") has the note beside it, in lines of its
   own. */
.doc-says { display: inline-flex; align-items: baseline; gap: 7px; }
/* Chinese and Korean may break between any two signs. A note is divided at
   its spaces first, so no sign is left alone on a line. A Japanese note is
   divided between its phrases (.doc-ph below). */
.doc-says:is(:lang(ko), :lang(zh)) { word-break: keep-all; }
/* A Chinese cell ends its lines at a space or a comma where it has one
   ("Safari" and then the word after it), not inside the next word. */
.doc :is(th, td):lang(zh) { word-break: keep-all; }
/* A price in a cell is not divided ("(Pro $9.99)"). */
.doc td .doc-dim { white-space: nowrap; }
.doc-yes, .doc-no, .doc-part {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}
.doc-yes { border: 1.5px solid var(--ink); background: var(--mint); }
.doc-part { border: 1.5px solid var(--ink); }
.doc-no { opacity: 0.4; }

/* --------------------------------------------------------------- cards
   A boxed entry of a list or a ranking: ink outline, flat shadow. */

.doc-card {
  margin-top: 1.5em;
  padding: 20px 22px 22px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: 4px 5px 0 var(--shade);
}
.doc-card.best { box-shadow: 5px 6px 0 var(--ink); }
.doc-card + p, .doc-card + ul { margin-top: 1.5em; }
.doc-card h3 { margin-top: 0; font-size: clamp(20px, 2vw, 24px); letter-spacing: -0.03em; }
.doc-card .doc-tag + h3 { margin-top: 12px; }
/* A heading with a number badge: a second line starts under the name, not
   under the badge, and the grey note goes to the next line whole, its dash
   with it. */
.doc-card h3:has(> .doc-num) { padding-inline-start: 40px; text-indent: -40px; }
.doc-card h3 > :is(.doc-num, .doc-dim) { text-indent: 0; }
.doc-card h3 > .doc-dim { display: inline-block; }
.doc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-inline-end: 10px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  vertical-align: 0.12em;
}
.doc-card.best .doc-num { border: 2px solid var(--ink); background: var(--mint); color: var(--ink); }
.doc-tag {
  display: inline-block;
  padding: 4px 8px 5px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1;
}
.doc-tag.best { background: var(--mint); }
/* Dots, not dashes: no browser fits a dash to a corner this small. */
.doc-tag.bad { border-style: dotted; }
/* The small button: inside a card, beside the App Store button. */
.doc .doc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 16px;
  padding: 7px 16px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--mint);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.012em;
  text-align: center;
  text-decoration: none;
  box-shadow: 3px 4px 0 var(--ink);
}
.doc .doc-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 5px 0 var(--ink); }
.doc .doc-btn:active { transform: translate(2px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.doc .doc-btn.plain { margin-top: 0; background: none; }

/* A picture that is not a capture of the app (the still of a shared video). */
.doc-shot {
  max-width: 420px;
  margin-top: 1.8em;
  border: 2px solid var(--ink);
  border-radius: 20px;
  background: var(--ink);
  box-shadow: 6px 7px 0 var(--shade);
  overflow: hidden;
}
.doc-shot img { display: block; width: 100%; height: auto; }

/* A capture of the app stands in the phone of the home page: ink body, round
   corners, the island, the three keys, the flat shadow. --phone is its width,
   every other measure follows from it. */
.doc-phone {
  --bezel: calc(var(--phone) * 0.035);
  position: relative;
  z-index: 0;
  display: block;
  width: var(--phone);
  margin: 2.2em auto 0;
  padding: var(--bezel);
  border-radius: calc(var(--phone) * 0.165);
  background: var(--ink);
  box-shadow: calc(var(--phone) * 0.043) calc(var(--phone) * 0.052) 0 var(--shade);
}
.doc-phone img, .doc-phone video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: calc(var(--phone) * 0.13);
  background: #242424;
}
/* WebKit on a phone only rounds a playing video that is clipped as well. */
.doc-phone video { aspect-ratio: 590 / 1282; object-fit: cover; overflow: hidden; clip-path: inset(0 round calc(var(--phone) * 0.13)); }
/* The island, on a crop only: a capture of a whole screen brings its own. */
.doc-stand .doc-phone::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: calc(var(--bezel) + var(--phone) * 0.028);
  left: calc(var(--phone) * 0.365);
  width: calc(var(--phone) * 0.27);
  height: calc(var(--phone) * 0.078);
  border-radius: 99px;
  background: var(--ink);
  pointer-events: none;
}
/* The keys: two on the left edge, one on the right. */
.doc-phone::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 calc(var(--phone) * -0.011);
  background:
    linear-gradient(transparent calc(var(--phone) * 0.455), var(--ink) 0 calc(var(--phone) * 0.574), transparent 0 calc(var(--phone) * 0.628), var(--ink) 0 calc(var(--phone) * 0.747), transparent 0) left / 6px 100% no-repeat,
    linear-gradient(transparent calc(var(--phone) * 0.542), var(--ink) 0 calc(var(--phone) * 0.737), transparent 0) right / 6px 100% no-repeat;
}
/* A crop of a screen is the upper part of the phone. It stands on the rule
   of the section that follows (every one is followed by a heading), so there
   is one line under it and not two. Its screen begins with an empty strip, so
   the island and the round corners lie on that and not on the crop. */
.doc-stand {
  width: -webkit-fit-content;
  width: fit-content;
  margin: 2.2em auto 0;
  padding: 4px calc(var(--phone) * 0.085) 0;
  overflow: hidden;
}
.doc-body .doc-stand + h2 { margin-top: 0; }
/* The phone and the line under it never get wider than the column. */
.doc-stand { --phone: min(270px, (100vw - 2 * var(--lp)) / 1.17); }
.doc-stand.wide { --phone: min(390px, (100vw - 2 * var(--lp)) / 1.17); }
.doc-stand .doc-phone { margin: 0; padding-bottom: 0; border-radius: calc(var(--phone) * 0.165) calc(var(--phone) * 0.165) 0 0; }
.doc-stand .doc-phone img {
  box-sizing: content-box;
  border-top: calc(var(--phone) * 0.125) solid #242424;
  border-radius: calc(var(--phone) * 0.13) calc(var(--phone) * 0.13) 0 0;
}
/* The tall crop (the drawer, crop-sidedock.webp, 527 by 803) begins in the
   middle of a line of text: its first 22 rows stay out of the picture. */
.doc-stand:not(.wide) .doc-phone img { aspect-ratio: 527 / 781; object-fit: cover; object-position: bottom; }
.doc-phone + h2 { margin-top: 2em; }
/* A Latin name or a price inside Arabic or Hebrew (each is wrapped in <bdi>,
   see isolate_latin_runs in i18n/build.py and Ltr.tsx) is not divided between
   two lines, where its halves would stand on opposite sides. In the narrow
   columns of a table it may be. */
.doc bdi:not(.doc-run) { white-space: nowrap; }
.doc table bdi { white-space: normal; }
/* What a line must not end inside: the unit of a price ("$0.99/mo" never
   ends a line with its slash), and the space before a slash or a plus that
   stands between two words ("CSS / JS" breaks after the slash, not before
   it). See keep_together in i18n/build.py. */
.doc .doc-nb, .doc .doc-nb bdi { white-space: nowrap; }
/* A box that goes to the next line whole: a phrase in a cell of a Japanese
   table (Japanese has no spaces, so a browser ends a line between any two
   signs, in the middle of a word as well), and a long word in a cell of any
   other table (a browser divides a word to fill up a line, also one that
   would fit on the next). See japanese_phrases and word_boxes in
   i18n/build.py. In a narrow table a box is divided inside when it is wider
   than its column (see the narrow tables below). The text around the boxes
   carries role="text", so a screen reader reads a cell as one text and not
   box by box. A marked word has the marker inside its box
   (marks_into_boxes). */
.doc-ph { display: inline-block; text-indent: 0; }
/* A price with its unit in a cell ("$13.99/month") is a box as well: it goes
   to the next line whole. Its own letters say which way it reads, so a price
   inside Arabic or Hebrew keeps its order. See price_boxes in i18n/build.py. */
.doc-price { display: inline-block; max-width: 100%; text-indent: 0; white-space: nowrap; unicode-bidi: plaintext; }
/* A wide table sizes its columns by their words. A Japanese phrase could be
   divided between any two signs, so the table would count it as narrow as one
   sign and take the room of its column away: there it is never divided. */
@media (min-width: 641px) {
  .doc-ph:lang(ja) { white-space: nowrap; }
}

/* ----------------------------------------------------------- questions */

.doc-faq { margin-top: 1em; }
.doc-body details { border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.doc-body details + details { border-top: 0; }
.doc-body h2 + details, .doc-body p + details { margin-top: 1em; }
.doc-body summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  font-size: clamp(17px, 1.5vw, 19px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  cursor: pointer;
  list-style: none;
}
.doc-body summary::-webkit-details-marker { display: none; }
.doc-body summary::after { content: "+"; flex: none; font-weight: 700; }
.doc-body details[open] summary::after { content: "\2212"; }
.doc-body details p { margin: 0; padding: 0 0 18px; padding-inline-end: 2.4em; font-size: 16.5px; line-height: 1.5; }

/* ------------------------------------------------- the end of the page
   The closing line with the button, and the links to related pages. */

.doc-end, .doc-related { margin-top: clamp(40px, 5vw, 68px); padding-top: clamp(22px, 2.6vw, 34px); border-top: 2px solid var(--ink); }
/* The questions end with a rule of their own. What follows them opens without
   a second one, or the gap between the two reads as an empty row. */
.doc-faq + .doc-end, .doc-body details + h2 { padding-top: 0; border-top: 0; }
.doc-body .doc-end h3, .doc-body .doc-related h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: clamp(24px, 2.5vw, 33px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1.06;
}
.doc-end p { margin-top: 10px; font-weight: 600; }
.doc-body .doc-end .l-cta { text-decoration: none; }
.doc-body .doc-end .l-cta:hover, .doc-head .l-cta:hover { background: var(--mint); }
.doc-related ul { margin: 14px 0 0; padding: 0; list-style: none; border-bottom: 1.5px solid var(--ink); }
.doc-related li { margin: 0; border-top: 1.5px solid var(--ink); }
.doc-body .doc-related a { display: block; padding: 11px 0; font-weight: 700; letter-spacing: -0.01em; text-decoration: none; }
.doc-body .doc-related a:hover { background: none; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* ------------------------------------------------------- lists of entries
   The blog, in one column: the latest post in a box, then one ruled row per
   post with its topic and its date on the first line. */

.doc-list { border-bottom: 1.5px solid var(--ink); }
.doc-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 16px;
  align-items: center;
  padding: 17px 0 19px;
  border-top: 1.5px solid var(--ink);
  text-decoration: none;
}
.doc-entry > * { grid-column: 1 / -1; }
.doc-entry h2 { margin-top: 11px; font-size: clamp(20px, 1.9vw, 24px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.14; text-wrap: balance; }
.doc-entry p { margin-top: 6px; font-size: 16px; line-height: 1.45; }
.doc-entry:hover h2 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.doc-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
/* The date of a row stands at the far end of its first line. */
.doc-entry > .doc-tags { grid-column: 1; }
.doc-entry > time { grid-column: 2; grid-row: 1; }
/* The latest post. */
.doc-entry.lead {
  margin-bottom: clamp(26px, 3.4vw, 40px);
  padding: 20px 22px 22px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: 5px 6px 0 var(--ink);
}
.doc-entry.lead:hover { transform: translate(-1px, -1px); box-shadow: 6px 7px 0 var(--ink); }
.doc-entry.lead:active { transform: translate(2px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.doc-entry.lead h2 { margin-top: 14px; font-size: clamp(25px, 3vw, 34px); font-weight: 900; letter-spacing: -0.04em; line-height: 1.05; }
.doc-entry.lead p { margin-top: 9px; font-size: 17px; }
.doc-entry.lead > .doc-meta { margin-top: 12px; }

/* The way to the newer and the older post. */
.doc-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 40px); margin-top: clamp(30px, 4vw, 52px); border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.doc-pager a { display: block; padding: 14px 0 16px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; text-decoration: none; }
.doc-pager .doc-meta { display: block; margin-bottom: 5px; }
.doc-pager .next { text-align: end; }
.doc-pager a:hover span:last-child { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

/* ------------------------------------------------------- the press kit */

.doc-dl { margin: 0.9em 0 0; border-bottom: 1.5px solid var(--ink); }
.doc-dl > div { display: grid; grid-template-columns: 11em minmax(0, 1fr); gap: 2px 16px; padding: 9px 0; border-top: 1.5px solid var(--ink); font-size: 16px; line-height: 1.4; }
.doc-dl dt { font-weight: 800; }
.doc-dl dd { margin: 0; }
/* A text to copy: its name and the button, then the text in a box. */
.doc-quote { margin-top: 1.3em; }
.doc-quote .doc-title { align-items: center; }
.doc-quote .doc-title p { margin: 0; font-size: 14.5px; font-weight: 800; }
.doc-quote > p { margin-top: 8px; padding: 14px 16px; border: 2px solid var(--ink); border-radius: 14px; box-shadow: 4px 5px 0 var(--shade); font-size: 15.5px; line-height: 1.5; }
.doc-body .doc-files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; padding: 0; list-style: none; border-bottom: 1.5px solid var(--ink); }
.doc-files li { margin: 0; border-top: 1.5px solid var(--ink); }
.doc-body .doc-files a { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 16px; font-weight: 700; text-decoration: none; }
.doc-files img { flex: none; padding: 3px; border-radius: 7px; background: var(--ink); }
/* A ruled list that ends a section leaves the closing to the rule over the next heading. */
.doc-body section:not(:last-child) > :is(.doc-dl, .doc-files):last-child { border-bottom: 0; }
/* And one that ends the page (the related pages, the posts, the way to the
   next post) leaves it to the footer rule. A rule of its own would stand a
   hand's breadth above that one, with nothing between the two but the cat. */
.doc-body > .doc-related:last-child ul, .doc > .doc-list:last-child, .doc > .doc-pager:last-child { border-bottom: 0; }
.doc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 1.2em; }
.doc-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Phones side by side share the column: two fit as they are, three are smaller. */
.doc-grid { --phone: min(270px, (100vw - 2 * var(--lp) - 22px) / 2 - 16px); padding-bottom: 8px; }
.doc-grid.three { --phone: calc((min(var(--measure), 100vw - 2 * var(--lp)) - 44px) / 3 - 14px); }
.doc-grid .doc-phone { margin-top: 0; }
.doc-grid figure { margin: 0; }
.doc-grid .doc-note { margin-top: 26px; text-align: center; }

/* ----------------------------------------- a shared video and an invite */

.doc-share h1 { font-size: clamp(30px, 4vw, 50px); }
.doc-share .doc-shot { margin: 0 0 clamp(22px, 3vw, 34px); }
.doc-share .doc-note { margin-top: 22px; }
/* The drawing has air inside its box: it is moved out by that much, to the edge of the column. */
.doc-glyph { display: block; margin-bottom: 18px; margin-inline-start: -3px; }
.doc-code { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; padding: 14px 0; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.doc-code > span { font: 700 24px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.2em; }

@media (max-width: 560px) {
  .doc-pager { grid-template-columns: 1fr; }
  .doc-pager .next { text-align: start; border-top: 1.5px solid var(--ink); }
  .doc-pager > span { display: none; }
  .doc-dl > div { grid-template-columns: 1fr; }
  .doc-body .doc-files { grid-template-columns: 1fr; }
  .doc-grid, .doc-grid.three { --phone: 250px; grid-template-columns: 1fr; gap: 34px; }
  .doc-entry.lead { padding: 16px 16px 18px; }
  .doc-body { font-size: 16.5px; }
  .doc-body details p { padding-inline-end: 0; font-size: 16px; }
  .doc-card { padding: 16px 16px 18px; }
  .doc-pager > span + .next { border-top: 0; }
}
/* A narrow table always fits the screen, in every language: on a phone, and
   up to the width where the columns get room enough of their own accord
   (just above the width of a phone a table that sizes its columns by their
   words left the note beside a mark too little). Its columns get a share of
   the width instead of the width of their longest word: the names of the
   features the larger one. The note of a mark stands under the mark, not
   beside it. A word that fits its column is never divided, not to fill the
   line before it either ("con-tent", "You-Tube"): every long word of a cell
   stands in a box (.doc-ph) that goes to the next line whole. Only a word
   wider than the whole column is divided, inside its box: the way its
   language does it, three letters at least before the hyphen and two after
   it (with more a word that is a little too long finds no place and loses
   its last letter to the next line), or at a syllable mark (.doc-shy) where
   the browser has no rules for the language. The mark is an empty element
   that holds a soft hyphen here, as generated content: a hyphen shows where
   the word is divided, and the text of the page has no sign more. Such a
   word fills its lines one after the other: Chrome leaves the hyphen out
   where it evens the lines out. */
@media (max-width: 640px) {
  .doc table { table-layout: fixed; font-size: 14px; }
  .doc th, .doc td { padding-inline-end: 10px; overflow-wrap: anywhere; }
  .doc :is(th, td) .doc-ph {
    white-space: normal;
    word-break: normal;
    -webkit-hyphens: auto;
    hyphens: auto;
    -webkit-hyphenate-limit-before: 3;
    -webkit-hyphenate-limit-after: 2;
    hyphenate-limit-chars: 6 3 2;
  }
  .doc :is(th, td) .doc-ph:has(.doc-shy) { text-wrap: wrap; }
  /* Polish ends words in two letters that are one sound ("Ustawienia-ch"):
     three letters at least go to the next line. */
  .doc :is(th, td) .doc-ph:lang(pl) { -webkit-hyphenate-limit-after: 3; hyphenate-limit-chars: 6 3 3; }
  /* A price and its unit are set a touch tighter: with the bracket that
     closes it, a price was a pixel or two wider than its column and the line
     ended before the slash ("$0,99" and then "/mies.)"). */
  .doc :is(th, td) :is(.doc-nb, .doc-price) { letter-spacing: -0.02em; }
  /* Only a price wider than its whole column is divided, after its slash,
     and nowhere else. */
  .doc :is(th, td) .doc-price { white-space: normal; overflow-wrap: normal; word-break: keep-all; -webkit-hyphens: manual; hyphens: manual; }
  .doc :is(th, td) .doc-shy::before { content: "\00AD"; content: "\00AD" / ""; }
  [dir="rtl"] .doc th, [dir="rtl"] .doc td { padding: 9px 0 9px 10px; }
  .doc th:last-child, .doc td:last-child { padding-inline: 0; }
  .doc th:first-child:nth-last-child(2) { width: 60%; }
  .doc th:first-child:nth-last-child(3) { width: 44%; }
  .doc th:first-child:nth-last-child(4) { width: 28%; }
  .doc-says { flex-direction: column; align-items: flex-start; gap: 4px; }
}
@media (max-width: 400px) {
  .doc table { font-size: 13.5px; }
  /* Four columns are narrow: a size smaller keeps most words whole. */
  .doc table:has(th:nth-child(4)) { font-size: 13px; }
}
/* Small phones: a long label still fits its button on one line where it can. */
@media (max-width: 360px) {
  .doc .l-cta { padding: 0 14px; font-size: 15.5px; }
  .doc .doc-btn { padding-inline: 11px; font-size: 14px; letter-spacing: -0.02em; }
}
