/* NothingExtended site: shared styles (Nothing OS look: black, white, one red
   dot, dot-matrix type). Both languages are in the markup: data-l="en" /
   data-l="ru", the other one is hidden by html[lang]. */
@font-face {
  font-family: "Doto";
  src: url("../fonts/doto-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --bg: #000000;
  --card: #1b1b1b;
  --card-hi: #242424;
  --text: #ffffff;
  --muted: #8e8e8e;
  --line: #2c2c2c;
  --dot: #262626;
  --red: #d71921;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, Consolas, monospace;
  --dots: "Doto", var(--mono);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f1f1f1;
    --card: #fcfcfc;
    --card-hi: #ffffff;
    --text: #1b1b1b;
    --muted: #6e6e6e;
    --line: #e0e0e0;
    --dot: #dcdcdc;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f1f1f1;
  --card: #fcfcfc;
  --card-hi: #ffffff;
  --text: #1b1b1b;
  --muted: #6e6e6e;
  --line: #e0e0e0;
  --dot: #dcdcdc;
  color-scheme: light;
}

html[lang="ru"] [data-l="en"],
html:not([lang="ru"]) [data-l="ru"] { display: none !important; }
/* The Russian mirror name (lang.js) vs the main one. */
html[data-host="ru"] [data-host-show="main"],
html:not([data-host="ru"]) [data-host-show="ru"] { display: none !important; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Dot-matrix backdrop behind the top of the page, fading out. */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 70vh;
  z-index: -1;
  background-image: radial-gradient(circle, var(--dot) 1.2px, transparent 1.7px);
  background-size: 14px 14px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 100%);
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
code {
  font: 0.92em/1.4 var(--mono);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 5px;
  overflow-wrap: anywhere;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 720px) {
  .wrap { padding: 0 32px; }
}

.label {
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.muted { color: var(--muted); }
.dots {
  font-family: var(--dots);
  font-variation-settings: "ROND" 100;
  font-weight: 700;
}
/* Doto's period is a cluster of dots; draw a single dot on the bottom row
   instead (the font's dot pitch is 0.1em). */
.pt {
  display: inline-block;
  position: relative;
  width: 0.3em;
  height: 0.1em;
}
.pt::after {
  content: "";
  position: absolute;
  left: 0.1em;
  bottom: 0.01em;
  width: 0.085em;
  height: 0.085em;
  border-radius: 50%;
  background: currentColor;
}

/* Top bar */
.top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 13px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  margin-right: auto;
  white-space: nowrap;
}
.red-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  flex: none;
}
.nav a {
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 10px 4px;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.seg {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  flex: none;
}
.seg button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.1em;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.seg button[aria-pressed="true"] {
  background: var(--text);
  color: var(--bg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid var(--text);
  background: var(--text);
  color: var(--bg);
  font: 600 15px/1.2 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; }
.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}
.btn.ghost:hover { border-color: var(--muted); opacity: 1; }
.btn.block { display: flex; width: 100%; }
.btn .arrow { font-family: var(--mono); }
.btn[aria-disabled="true"] { pointer-events: none; opacity: 0.4; }

/* Status chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.chip i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text);
}
.chip.testing i {
  background: var(--red);
  animation: blink 1.6s steps(1, end) infinite;
}
@keyframes blink { 50% { opacity: 0.15; } }
@media (prefers-reduced-motion: reduce) {
  .chip.testing i, .status .red-dot { animation: none; }
}

/* Cards */
.card {
  background: var(--card);
  border-radius: 24px;
  padding: 18px 18px 20px;
  min-width: 0;
}

/* Page heading (download pages) */
.page-head { padding: 40px 0 28px; }
@media (min-width: 900px) { .page-head { padding: 72px 0 40px; } }
.page-head h1 {
  margin: 12px 0 12px;
  font: 700 clamp(36px, 7vw, 64px)/1.02 var(--sans);
  letter-spacing: -0.02em;
}
.page-head p { margin: 0; max-width: 60ch; color: var(--muted); font-size: 18px; }
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font: 500 12px/1.4 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }

/* Device chooser */
.brand-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.brand-row h2 { margin: 0; font: 600 20px/1.2 var(--sans); }
.devices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 12px;
  padding-bottom: 32px;
}
.dev-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 300px;
  padding: 20px;
  border-radius: 24px;
  background: var(--card);
  text-decoration: none;
  border: 1px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}
.dev-card:hover { border-color: var(--line); background: var(--card-hi); }
.dev-card .top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.dev-card .num {
  font-size: 104px;
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin: auto 0 0;
}
.dev-card .name { font: 600 24px/1.2 var(--sans); }
.dev-card .code { font: 500 13px/1.4 var(--mono); color: var(--muted); }
.dev-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  font-size: 14px;
  color: var(--muted);
}
.dev-card .go { font: 500 18px/1 var(--mono); color: var(--text); }
.hint {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border: 1px dashed var(--line);
  border-radius: 24px;
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 48px;
}
.hint strong { color: var(--text); font-weight: 600; }

/* Device page */
.dev-hero {
  display: grid;
  gap: 20px;
  padding: 32px 0 32px;
}
@media (min-width: 900px) { .dev-hero { padding: 56px 0 40px; } }
.dev-hero h1 {
  margin: 0;
  font-size: clamp(52px, 12vw, 120px);
  line-height: 0.92;
  text-transform: uppercase;
}
.dev-hero .sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  font: 500 14px/1.4 var(--mono);
  color: var(--muted);
}
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  padding-bottom: 56px;
}
@media (min-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; }
  .layout aside { order: 2; }
  .layout .guide { order: 1; }
  .layout aside .sticky { position: sticky; top: 16px; }
}
.dl { display: grid; gap: 14px; padding: 20px; }
.dl .ver { font-size: 52px; line-height: 1; }
.dl .row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.dl .row span:first-child { color: var(--muted); }
.dl .row span:last-child { text-align: right; }
.dl hr { border: 0; border-top: 1px solid var(--line); margin: 2px 0; width: 100%; }
.dl .links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.dl .links a { color: var(--muted); }
.dl .links a:hover { color: var(--text); }
.sha {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 12px/1.4 var(--mono);
  color: var(--muted);
  min-width: 0;
}
.sha span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.icon-btn {
  appearance: none;
  flex: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 8px;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 8px;
  cursor: pointer;
}
.icon-btn:hover { color: var(--text); border-color: var(--muted); }
.wait {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  font-size: 14px;
  color: var(--muted);
}
.wait strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 4px; }

/* Wraps instead of scrolling: the Russian labels are wider than the column. */
.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 2px 0 18px;
}
.toc a {
  flex: none;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}
.toc a:hover { color: var(--text); border-color: var(--muted); }

.sec { padding: 28px 0; border-top: 1px solid var(--line); }
.sec:first-of-type { border-top: 0; padding-top: 4px; }
.sec h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 16px;
  font: 600 26px/1.2 var(--sans);
  letter-spacing: -0.01em;
}
.sec h2 .n { font: 500 12px/1 var(--mono); color: var(--muted); letter-spacing: 0.1em; }
.sec h3 { margin: 22px 0 10px; font: 600 17px/1.3 var(--sans); }
.sec p { margin: 0 0 12px; max-width: 70ch; }
.sec ul { margin: 0 0 12px; padding-left: 20px; max-width: 70ch; }
.sec li { margin: 6px 0; }
.sec li::marker { color: var(--muted); }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; max-width: 72ch; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding: 0 0 22px 48px;
  margin: 0;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font: 600 13px/1 var(--mono);
}
.steps > li::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 34px;
  bottom: 4px;
  border-left: 1px dotted var(--line);
}
.steps > li:last-child::after { display: none; }
.steps > li > strong:first-child { display: block; margin-bottom: 4px; font-weight: 600; }
.steps p { margin: 4px 0 8px; }

.cmd {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  padding: 10px 10px 10px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  min-width: 0;
}
.cmd pre {
  flex: 1;
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 14px/1.5 var(--mono);
  min-width: 0;
}
.cmd pre::before { content: "$ "; color: var(--muted); }
.cmd.win pre::before { content: "> "; }

.os { display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; flex-wrap: wrap; }
html:not([data-os="win"]) [data-os-show="win"],
html[data-os="win"] [data-os-show="unix"] { display: none !important; }

.note {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--card);
  font-size: 15px;
  max-width: 72ch;
}
.note .label { display: flex; align-items: center; gap: 8px; color: var(--text); }
.note p { margin: 0; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 720px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.facts .card { min-height: 108px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.facts .v { font-size: 17px; font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; }
.facts .s { color: var(--muted); font-size: 13px; margin-top: 2px; }

.changelog { display: grid; gap: 6px; max-width: 72ch; }
.changelog .title { font-weight: 600; font-size: 18px; margin-bottom: 6px; }
.changelog .head { font-weight: 600; margin-top: 12px; }
.changelog .item { padding-left: 2px; }

footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
footer p { margin: 0 0 8px; max-width: 72ch; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: var(--text);
  color: var(--bg);
  border-radius: 999px;
  padding: 10px 18px;
  font: 500 13px/1 var(--mono);
  transition: opacity 0.2s, transform 0.2s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

[hidden] { display: none !important; }
@media (max-width: 440px) {
  .nav { display: none; }
}

/* Home */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 32px;
  padding: 48px 0 40px;
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1fr 280px; padding: 88px 0 64px; }
  /* Leave room for the ring: page gutters 64 + ring 280 + gap 32. */
  .hero h1 { font-size: min(150px, (100vw - 376px) / 4.8); }
}
.hero h1 {
  margin: 14px 0 20px;
  /* Doto is monospaced, 0.6em per glyph: "EXTENDED" is 4.8em wide. */
  font-size: clamp(48px, 18vw, 168px);
  line-height: 0.92;
  letter-spacing: 0;
  text-transform: uppercase;
  overflow-wrap: normal;
}
.hero h1 span { display: block; }
.lead {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(18px, 2.4vw, 22px);
  line-height: 1.4;
}
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.ring {
  display: none;
  justify-self: end;
  width: 280px;
  height: 280px;
}
@media (min-width: 900px) { .ring { display: block; } }
.ring circle { fill: var(--line); }
.ring circle.on { fill: var(--text); }
.ring circle.red { fill: var(--red); }
.ring text {
  fill: var(--text);
  font-family: var(--dots);
  font-variation-settings: "ROND" 100;
  font-weight: 700;
  font-size: 40px;
}
.ring text.small {
  fill: var(--muted);
  font: 500 11px var(--mono);
  font-variation-settings: normal;
  letter-spacing: 0.12em;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-bottom: 48px;
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
}
.grid .card {
  min-height: 148px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}
.grid .card.wide { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .grid .card.wide { grid-column: span 2; }
}
.card .value {
  font-size: clamp(20px, 2.6vw, 26px);
  font-weight: 500;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
.card .value.dots {
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1;
  white-space: nowrap;
}
.card .sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}
.dev-list { display: grid; gap: 8px; }
.dev-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  font-size: clamp(18px, 2.2vw, 22px);
  font-weight: 500;
}
.dev-list a:hover .go { color: var(--text); }
.dev-list .go { font: 500 16px/1 var(--mono); color: var(--muted); }
.dev-list .right { display: flex; align-items: center; gap: 12px; }

.section-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin: 8px 0 16px;
}
.section-title h2 { margin: 0; font: 600 clamp(26px, 4vw, 36px)/1.15 var(--sans); letter-spacing: -0.01em; }
.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 8px;
  padding-bottom: 56px;
}
@media (min-width: 900px) { .features { gap: 12px; } }
.features .card { display: grid; align-content: start; gap: 10px; min-height: 180px; }
.features h3 { margin: 6px 0 0; font: 600 19px/1.25 var(--sans); }
.features p { margin: 0; color: var(--muted); font-size: 15px; }

/* Screenshots: a grid of thumbnails, opened full size in .lb (site.js). */
.shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 8px;
  padding-bottom: 56px;
}
@media (min-width: 640px) { .shots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 12px; } }
@media (min-width: 900px) { .shots { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.shots figure { margin: 0; display: grid; align-content: start; gap: 10px; min-width: 0; }
.shot {
  display: block;
  aspect-ratio: 1080 / 2412;
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
}
.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s;
}
.shot:hover img { transform: scale(1.02); }
@media (prefers-reduced-motion: reduce) { .shot img { transition: none; } }
.shots figcaption { font-size: 15px; font-weight: 500; line-height: 1.3; }
.shots figcaption .s { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; font-weight: 400; }

.lb {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #fff;
}
.lb figure {
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 12px;
  min-width: 0;
}
.lb img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 120px);
  max-height: calc(100dvh - 120px);
  width: auto;
  height: auto;
  border-radius: 22px;
  border: 1px solid #2c2c2c;
}
.lb figcaption { font-size: 15px; text-align: center; }
.lb figcaption .s { display: block; color: #8e8e8e; font-size: 13px; }
.lb button {
  appearance: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #3a3a3a;
  background: rgba(27, 27, 27, 0.8);
  color: #fff;
  font: 500 20px/1 var(--mono);
  cursor: pointer;
}
.lb button:hover { border-color: #8e8e8e; }
.lb .close { position: absolute; top: 16px; right: 16px; }
@media (max-width: 640px) {
  .lb { grid-template-columns: minmax(0, 1fr); padding: 64px 12px 16px; }
  .lb .prev, .lb .next { display: none; }
  .lb img { max-height: calc(100vh - 160px); max-height: calc(100dvh - 160px); }
}

/* (were inline styles: the CSP allows only this stylesheet) */
.facts-dev { padding-bottom: 32px; }
.ver-date { font-size: 14px; margin-top: 6px; }
.small { margin: 0; font-size: 13px; }
