/* =========================================================
   Fragment — стили
   Палитра и знаки взяты из режима «Показывать границы
   макета» в Android: синие уголки, розовые контуры.
   ========================================================= */

/* ---------- шрифты (локальные, OFL) ---------- */
@font-face {
  font-family: "Roboto Flex";
  font-style: normal;
  font-weight: 500 900;
  font-stretch: 100% 151%;
  font-display: swap;
  src: url("../fonts/RobotoFlex-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Roboto Flex";
  font-style: normal;
  font-weight: 500 900;
  font-stretch: 100% 151%;
  font-display: swap;
  src: url("../fonts/RobotoFlex-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Roboto Flex";
  font-style: normal;
  font-weight: 500 900;
  font-stretch: 100% 151%;
  font-display: swap;
  src: url("../fonts/RobotoFlex-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/GolosText-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/GolosText-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/GolosText-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/JetBrainsMono-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/JetBrainsMono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- токены ---------- */
:root {
  --paper: #ECEFF3;
  --surface: #FFFFFF;
  --surface-2: #F5F7FA;
  --ink: #10141B;
  --ink-2: #2E3644;
  --muted: #5B6575;
  --rule: #CDD3DC;
  --rule-soft: #DEE3EA;

  --bounds: #2D4BFF;        /* уголки границ макета */
  --bounds-ink: #1F37D6;
  --margin: #F0428B;        /* контур границ макета */
  --margin-line: rgba(240, 66, 139, .7);
  --margin-ink: #B0145A;

  --tint-blue: #E3E8FF;
  --tint-pink: #FFE4EF;
  --tint-grey: #E4E9EF;

  --console: #121821;
  --console-line: #222C3A;
  --console-ink: #C9D4E3;
  --console-dim: #8090A6;

  --ok: #0B7A3B;

  /* подсветка кода — как в светлой теме Android Studio */
  --kw: #0033B3;
  --str: #067D17;
  --com: #6E7781;
  --ann: #7F6A00;
  --attr: #174AD4;

  --font-display: "Roboto Flex", "Golos Text", system-ui, sans-serif;
  --font-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-2);
  font: 400 17px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
button, input { font: inherit; color: inherit; }

code {
  font-family: var(--font-mono);
  font-size: .86em;
  color: var(--ink);
  background: rgba(16, 20, 27, .06);
  padding: .1em .36em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}

pre, code, .tx, .tree, .chip, .logcat__lines { font-variant-ligatures: none; }
a[href^="tel:"] { white-space: nowrap; }

:focus-visible { outline: 2px solid var(--bounds); outline-offset: 3px; }
::selection { background: var(--tint-pink); color: var(--ink); }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- фирменный знак: границы макета ---------- */
.bounds {
  --bc: var(--bounds);
  --bt: 2px;
  --bl: 10px;
  outline: 1px solid var(--margin-line);
  outline-offset: -1px;
  background-image:
    linear-gradient(var(--bc), var(--bc)), linear-gradient(var(--bc), var(--bc)),
    linear-gradient(var(--bc), var(--bc)), linear-gradient(var(--bc), var(--bc)),
    linear-gradient(var(--bc), var(--bc)), linear-gradient(var(--bc), var(--bc)),
    linear-gradient(var(--bc), var(--bc)), linear-gradient(var(--bc), var(--bc));
  background-repeat: no-repeat;
  background-size:
    var(--bl) var(--bt), var(--bt) var(--bl),
    var(--bl) var(--bt), var(--bt) var(--bl),
    var(--bl) var(--bt), var(--bt) var(--bl),
    var(--bl) var(--bt), var(--bt) var(--bl);
  background-position:
    0 0, 0 0,
    100% 0, 100% 0,
    0 100%, 0 100%,
    100% 100%, 100% 100%;
}

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55em;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--bounds);
  border-radius: 10px;
  background: var(--bounds);
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .12s ease;
}
.btn:hover:not(:disabled) { background: var(--bounds-ink); border-color: var(--bounds-ink); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }

.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn--ghost:hover:not(:disabled) { background: var(--surface); border-color: var(--ink); color: var(--ink); }

.btn--small { min-height: 40px; padding: 0 16px; font-size: .94rem; white-space: nowrap; }
.btn--mono { font-family: var(--font-mono); font-size: .9rem; }

/* ---------- шапка ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(236, 239, 243, .88);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--rule-soft);
}
.topbar__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 760;
  font-size: 1.2rem;
  letter-spacing: -.01em;
}
.brand svg { width: 26px; height: 26px; }

.topnav { display: flex; gap: 22px; }
.topnav a { color: var(--muted); font-size: .94rem; text-decoration: none; }
.topnav a:hover { color: var(--ink); }

.topbar__phone {
  margin-left: auto;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: .88rem;
  text-decoration: none;
  white-space: nowrap;
}
.topbar__phone:hover { color: var(--bounds-ink); }

@media (max-width: 980px) { .topnav { display: none; } }
@media (max-width: 600px) {
  .topbar__phone { display: none; }
  .topbar__cta { margin-left: auto; }
}

/* ---------- общие заголовки ---------- */
.eyebrow {
  margin-bottom: 16px;
  color: var(--bounds-ink);
  font-family: var(--font-mono);
  font-size: .82rem;
  font-weight: 500;
}

.section {
  padding-block: clamp(64px, 9vw, 120px);
  border-top: 1px solid var(--rule);
}
.section__head {
  max-width: 860px;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section__title {
  color: var(--ink);
  font-family: var(--font-display);
  font-variation-settings: "wdth" 125;
  font-weight: 760;
  font-size: clamp(1.9rem, 4.2vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.section__lead {
  max-width: 64ch;
  margin-top: 18px;
  font-size: 1.1rem;
}

h3 {
  color: var(--ink);
  font-size: 1.12rem;
  font-weight: 600;
  line-height: 1.35;
}

.stack > * + * { margin-top: 16px; }

/* ---------- первый экран ---------- */
.hero { padding-block: clamp(40px, 7vw, 88px) clamp(56px, 8vw, 104px); }

.hero__title {
  max-width: 1040px;
  color: var(--ink);
  font-family: var(--font-display);
  font-variation-settings: "wdth" 132;
  font-weight: 780;
  font-size: clamp(2.35rem, 7.2vw, 6rem);
  line-height: .98;
  letter-spacing: -.025em;
  text-wrap: balance;
}

/* слово «фрагментов» в рамке границ макета */
.hl {
  --bl: .26em;
  --bt: max(3px, .035em);
  padding: 0 .07em;
  white-space: nowrap;
  outline-width: 2px;
}

.hero__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px 48px;
  margin-top: clamp(24px, 3.5vw, 40px);
}
.hero__lead {
  max-width: 58ch;
  font-size: clamp(1.04rem, 1.4vw, 1.18rem);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 820px) {
  .hero__row { grid-template-columns: 1fr; align-items: start; }
}

/* ---------- стенд с демонстрацией ---------- */
.bench {
  --short: min(232px, 42vw);
  --long: calc(var(--short) * 1.8);
  display: grid;
  grid-template-columns: minmax(0, calc(var(--long) + 64px)) minmax(0, 1fr);
  gap: 16px;
  margin-top: clamp(40px, 6vw, 72px);
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--rule-soft);
  border-radius: 20px;
  box-shadow: 0 1px 0 rgba(16, 20, 27, .03), 0 32px 64px -44px rgba(16, 20, 27, .4);
}
@media (max-width: 920px) { .bench { grid-template-columns: minmax(0, 1fr); } }

.bench__stage { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.bench__console { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.stage {
  position: relative;
  display: grid;
  place-items: center;
  height: calc(var(--long) + 72px);
  overflow: hidden;
  border-radius: 12px;
  background-color: var(--surface-2);
  background-image:
    linear-gradient(var(--rule-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule-soft) 1px, transparent 1px);
  background-size: 16px 16px;
  background-position: -1px -1px;
}

.stage__pending {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 8px;
  border: 1px solid rgba(240, 66, 139, .4);
  border-radius: 6px;
  background: var(--tint-pink);
  color: var(--margin-ink);
  font-family: var(--font-mono);
  font-size: .72rem;
  line-height: 1.4;
}
.stage__pending[hidden] { display: none; }

.stage__file {
  position: absolute;
  bottom: 10px; left: 12px; right: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* устройство */
.device {
  width: var(--short);
  height: var(--long);
  padding: 8px;
  border-radius: 26px;
  background: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 22px 40px -22px rgba(16, 20, 27, .55);
  transition: width .55s cubic-bezier(.65, 0, .25, 1), height .55s cubic-bezier(.65, 0, .25, 1);
}
.device[data-orientation="landscape"] { width: var(--long); height: var(--short); }

.device__screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: 19px;
  background: #fff;
}
.device__bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 28px;
  padding: 0 12px;
  background: var(--bounds);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
}
.device__icons { display: flex; gap: 4px; }
.device__icons i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, .7); }

.device__body {
  flex: 1;
  display: flex;
  gap: 6px;
  min-height: 0;
  padding: 6px;
}

.slot {
  position: relative;
  flex: 2 1 0;
  min-width: 0;
  border: 1px dashed #A9B3C2;
  border-radius: 4px;
}
.slot--pane { flex: 1 1 0; display: none; }
.device[data-orientation="landscape"] .slot--pane {
  display: block;
  animation: fade-in .4s ease .35s both;
}
.slot__label {
  position: absolute;
  top: 2px; left: 5px;
  max-width: calc(100% - 10px);
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* фрагменты внутри устройства */
.frag {
  position: absolute;
  inset: 16px 4px 4px;
  overflow: hidden;
  padding: 15px 7px 7px;
  border-radius: 2px;
  background-color: var(--tint-blue);
  transition: opacity .26s ease, transform .26s ease;
}
.frag.is-entering { opacity: 0; transform: translateY(6px); }
.frag.is-leaving { opacity: 0; }

.frag__tag {
  position: absolute;
  top: 3px; left: 6px; right: 6px;
  overflow: hidden;
  color: var(--ink);
  opacity: .75;
  font-family: var(--font-mono);
  font-size: 8.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.frag--detail { background-color: var(--tint-pink); }
.frag--preview { background-color: var(--tint-grey); }
.frag--player {
  --bc: #7E92FF;
  inset: auto 10px calc(10px + var(--n, 0) * 14px) 10px;
  height: 17%;
  min-height: 36px;
  padding-top: 13px;
  background-color: var(--ink);
  box-shadow: 0 8px 16px -8px rgba(16, 20, 27, .6);
}
.frag--player .frag__tag { color: #fff; }

.ui-list { display: grid; gap: 7px; }
.ui-row { display: grid; grid-template-columns: 16px 1fr; align-items: center; gap: 6px; }
.ui-row b { width: 16px; height: 16px; border-radius: 3px; background: #B6C2FF; }
.ui-row span { display: grid; gap: 4px; }
.ui-row span::before,
.ui-row span::after { content: ""; height: 4px; border-radius: 2px; background: #BFCAFF; }
.ui-row span::after { width: 58%; }

.ui-detail { display: grid; gap: 6px; }
.ui-media { display: block; aspect-ratio: 16 / 8; border-radius: 3px; background: #F6B3CE; }
.ui-line { display: block; height: 4px; border-radius: 2px; background: #F1C0D4; }
.ui-line--title { width: 72%; height: 7px; background: #E48AAE; }
.ui-line--short { width: 48%; }

.ui-player { display: flex; align-items: center; gap: 8px; height: 100%; }
.ui-play {
  flex: none;
  width: 0; height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid #fff;
}
.ui-progress { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .22); }
.ui-progress b {
  display: block;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: #8FA0FF;
  animation: progress 9s linear infinite alternate;
}

.ui-preview { display: grid; gap: 6px; }
.ui-preview .ui-line { background: #C9D2DD; }
.ui-preview .ui-line--title { background: #9AA7B8; }
.ui-preview .ui-box { display: block; aspect-ratio: 1 / .7; border-radius: 3px; background: #D3DBE5; }

/* инспектор */
.inspector {
  padding: 12px 14px;
  border: 1px solid var(--rule-soft);
  border-radius: 12px;
}
.inspector__title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .72rem;
}
.inspector__list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--font-mono);
  font-size: .76rem;
}
.inspector__list li:first-child { border-top: 0; }
.insp__name { color: var(--ink); font-weight: 500; }
.insp__tag { overflow: hidden; color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.insp__state { display: inline-flex; align-items: center; gap: 5px; color: var(--ok); font-size: .68rem; font-weight: 500; }
.insp__state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.insp__empty { color: var(--muted); }

/* панель транзакции */
.panel {
  overflow: hidden;
  border: 1px solid var(--rule-soft);
  border-radius: 12px;
}
.panel__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 12px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--rule-soft);
  background: var(--surface-2);
}
.panel__title { color: var(--ink); font-size: .95rem; font-weight: 600; }
.panel__hint { color: var(--muted); font-family: var(--font-mono); font-size: .74rem; }

.tx {
  min-height: calc(1.65em * 6 + 28px);
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: .78rem;
  line-height: 1.65;
}
.tx-line { display: block; width: max-content; min-width: 100%; }
.tx-line.is-new { animation: line-flash 1.1s ease; }

.controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--rule-soft);
}
.controls__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.chip {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: .78rem;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.chip:hover:not(:disabled) { border-color: var(--bounds); background: var(--tint-blue); }
.chip:disabled { opacity: .42; cursor: not-allowed; }
.chip__op { color: var(--kw); }

.link-btn {
  min-height: 40px;
  padding: 0 8px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: .92rem;
  text-decoration: underline;
  text-underline-offset: .2em;
  cursor: pointer;
}
.link-btn:hover { color: var(--ink); }

/* Logcat */
.logcat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 250px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--console);
  color: var(--console-ink);
}
.logcat__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px 9px 14px;
  border-bottom: 1px solid var(--console-line);
  font-family: var(--font-mono);
  font-size: .74rem;
}
.logcat__title { color: #fff; font-weight: 500; }
.logcat__filter { padding: 2px 8px; border: 1px solid var(--console-line); border-radius: 5px; color: var(--console-dim); }
.logcat__clear {
  margin-left: auto;
  padding: 6px 8px;
  border: 0;
  border-radius: 5px;
  background: none;
  color: var(--console-dim);
  font: inherit;
  cursor: pointer;
}
.logcat__clear:hover { color: #fff; background: var(--console-line); }

.logcat__lines {
  flex: 1 1 0;
  min-height: 210px;
  padding: 8px 0;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: .72rem;
  line-height: 1.55;
  scrollbar-color: #2E3A4B transparent;
}
.lc {
  display: grid;
  grid-template-columns: auto 1.5em auto minmax(0, 1fr);
  gap: 10px;
  padding: 1px 14px;
}
.lc__time { color: var(--console-dim); }
.lc__lvl { align-self: start; border-radius: 3px; background: #7AA2FF; color: var(--console); font-weight: 700; text-align: center; }
.lc--i .lc__lvl { background: #7FD4A0; }
.lc--w .lc__lvl { background: #F2C86B; }
.lc__tag { color: #9FB0C8; }
.lc__msg { overflow-wrap: anywhere; }
.lc--w .lc__msg { color: #F2C86B; }

@media (max-width: 560px) {
  .lc { grid-template-columns: 1.5em minmax(0, 1fr); gap: 8px; }
  .lc__time, .lc__tag, .logcat__filter { display: none; }
}

/* ---------- почему не Activity ---------- */
.why {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(32px, 6vw, 80px);
}
@media (max-width: 900px) { .why { grid-template-columns: minmax(0, 1fr); } }

.issues li { padding: 22px 0; border-top: 1px solid var(--rule); }
.issues li:last-child { border-bottom: 1px solid var(--rule); }
.issues p { margin-top: 6px; }

.nest__box {
  position: relative;
  padding: 32px 14px 14px;
  border-radius: 2px;
  background-color: var(--surface);
}
.nest__box--frame { background-color: var(--surface-2); }
.nest__box--frag { background-color: var(--tint-pink); }
.nest__box--view {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 6px;
  min-height: 96px;
  background-color: var(--tint-blue);
}
.nest__label {
  position: absolute;
  top: 9px; left: 12px; right: 12px;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: .74rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.nest__label span { color: var(--muted); }
.nest__view {
  padding: 3px 8px;
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: .72rem;
}
.figure-note { margin-top: 14px; color: var(--muted); font-size: .94rem; }

/* ---------- жизненный цикл ---------- */
.cycle {
  position: relative;
  display: grid;
  grid-template-columns: 8.5rem repeat(6, minmax(0, 1fr));
  grid-template-rows: auto auto auto;
  gap: 12px;
}
.cycle__label {
  grid-column: 1;
  grid-row: var(--row);
  align-self: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .78rem;
}
.cycle__label--up::after { content: " →"; }
.cycle__label--down::before { content: "← "; }

.cycle__cb {
  position: relative;
  z-index: 1;
  grid-column: var(--col);
  grid-row: var(--row);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 8px 6px;
  border: 1px solid var(--rule-soft);
  border-radius: 8px;
  background-color: var(--surface);
  color: var(--ink);
  font-size: .78rem;
  text-align: center;
}
.cycle__cb.bounds { border-color: transparent; border-radius: 2px; }

.cycle__view {
  z-index: 0;
  grid-column: 4 / 8;
  grid-row: 1 / 4;
  margin: -8px;
  border-radius: 14px;
  background: var(--tint-blue);
}
.cycle__view-label {
  z-index: 1;
  grid-column: 4 / 8;
  grid-row: 3;
  color: var(--bounds-ink);
  font-family: var(--font-mono);
  font-size: .74rem;
  text-align: center;
}

@media (max-width: 760px) {
  .cycle {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto repeat(6, auto) auto;
    gap: 10px;
  }
  .cycle__label { grid-column: var(--row); grid-row: 1; }
  .cycle__label--up::after { content: " ↓"; }
  .cycle__label--down::before { content: "↑ "; }
  .cycle__cb { grid-column: var(--row); grid-row: var(--col); min-height: 46px; }
  .cycle__view { grid-column: 1 / 3; grid-row: 4 / 9; }
  .cycle__view-label { grid-column: 1 / 3; grid-row: 8; padding-inline: 8px; }
}

.notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 44px;
}
.note {
  padding: 18px 20px;
  border: 1px solid var(--rule-soft);
  border-radius: 12px;
  background: var(--surface);
}
.note__key {
  display: block;
  margin-bottom: 8px;
  color: var(--bounds-ink);
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 500;
}
@media (max-width: 860px) { .notes { grid-template-columns: minmax(0, 1fr); } }

/* ---------- фрагменты кода ---------- */
.snippet {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--rule-soft);
  border-radius: 12px;
  background: #FBFCFD;
}
.snippet__name {
  padding: 9px 14px;
  border-bottom: 1px solid var(--rule-soft);
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .74rem;
}
.snippet pre {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: .78rem;
  line-height: 1.65;
  tab-size: 4;
}
.snippet code {
  padding: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font-size: inherit;
  overflow-wrap: normal;
}

.t-kw, .t-tag { color: var(--kw); }
.t-str { color: var(--str); }
.t-com { color: var(--com); font-style: italic; }
.t-ann { color: var(--ann); }
.t-attr { color: var(--attr); }

.now { font-size: .94rem; }
.now__tag {
  display: inline-block;
  margin-right: 8px;
  padding: 0 7px;
  border: 1px solid rgba(240, 66, 139, .5);
  border-radius: 4px;
  color: var(--margin-ink);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  line-height: 1.7;
  vertical-align: 1px;
}

/* ---------- транзакции ---------- */
.compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.op {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--rule-soft);
  border-radius: 16px;
  background: var(--surface);
}
.op__name {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 500;
}
.op__result {
  margin-top: auto;
  padding: 10px 12px;
  border-radius: 8px;
  background: #E7F4EC;
  color: #0A5A2C;
  font-family: var(--font-mono);
  font-size: .78rem;
}
.op__result--warn { background: #FFF3D6; color: #6B4E00; }

.duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 48px);
  align-items: start;
  margin-top: clamp(40px, 6vw, 72px);
}
.duo > * { min-width: 0; }
@media (max-width: 860px) {
  .compare, .duo { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- поворот, связь ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  align-items: start;
  gap: clamp(28px, 5vw, 64px);
}
@media (max-width: 900px) { .split { grid-template-columns: minmax(0, 1fr); } }

.tree {
  margin: 0;
  padding: 14px 16px;
  overflow-x: auto;
  border: 1px solid var(--rule-soft);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: .78rem;
  line-height: 1.75;
}
.tree .t-com { font-style: normal; }

.relay {
  padding: 26px 20px 20px;
  border: 1px solid var(--rule-soft);
  border-radius: 16px;
  background: var(--surface);
}
.relay__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.relay__node {
  padding: 10px 12px;
  border-radius: 8px;
  background-color: var(--tint-pink);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: .78rem;
  white-space: nowrap;
}
.relay__node--hub { border-radius: 2px; background-color: var(--tint-blue); }
.relay__arrow { color: var(--muted); font-family: var(--font-mono); }
.relay__no {
  position: relative;
  height: 16px;
  margin: 12px 14% 0;
  border: 1px dashed var(--margin);
  border-top: 0;
}
.relay__no span {
  position: absolute;
  left: 50%; top: 100%;
  transform: translate(-50%, -50%);
  padding: 0 8px;
  background: var(--surface);
  color: var(--margin-ink);
  font-family: var(--font-mono);
  font-size: .74rem;
  white-space: nowrap;
}
.relay .figure-note { margin-top: 28px; }

@media (max-width: 560px) {
  .relay__row { flex-direction: column; align-items: stretch; text-align: center; }
  .relay__arrow { transform: rotate(90deg); align-self: center; }
  .relay__no { display: none; }
  .relay .figure-note { margin-top: 18px; }
}

/* ---------- таблица механизмов ---------- */
.table-wrap {
  overflow: hidden;
  border: 1px solid var(--rule-soft);
  border-radius: 16px;
  background: var(--surface);
}
.mech { width: 100%; border-collapse: collapse; font-size: .95rem; }
.mech th, .mech td {
  padding: 16px 18px;
  border-top: 1px solid var(--rule-soft);
  text-align: left;
  vertical-align: top;
}
.mech thead th {
  border-top: 0;
  background: var(--surface-2);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
}
.mech tbody th { width: 23%; font-weight: 500; }
.mech tbody th code { padding: 0; background: none; color: var(--bounds-ink); font-size: .8rem; }

@media (max-width: 820px) {
  .mech thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mech, .mech tbody, .mech tr, .mech th, .mech td { display: block; width: auto; }
  .mech tr { padding: 18px; border-top: 1px solid var(--rule-soft); }
  .mech tbody tr:first-child { border-top: 0; }
  .mech th, .mech td { padding: 0; border: 0; }
  .mech tbody th { width: auto; }
  .mech td { margin-top: 12px; }
  .mech td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: .7rem;
  }
}

/* ---------- подвал ---------- */
.footer {
  padding-block: 52px 36px;
  border-top: 1px solid var(--rule);
  font-size: .92rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, .7fr);
  gap: 36px 56px;
}
@media (max-width: 900px) { .footer__grid { grid-template-columns: minmax(0, 1fr); } }

.footer__title {
  margin-bottom: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: .74rem;
}
.footer__about { max-width: 46ch; color: var(--muted); }
.footer__about p + p { margin-top: 10px; }
.footer__about .brand { margin-bottom: 14px; }

.seller > div {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--rule-soft);
}
.seller > div:first-child { padding-top: 0; border-top: 0; }
.seller dt { padding-top: .2em; color: var(--muted); font-family: var(--font-mono); font-size: .74rem; }
.seller dd { color: var(--ink); }
.seller a { text-decoration: none; }
.seller a:hover { color: var(--bounds-ink); text-decoration: underline; }
@media (max-width: 480px) {
  .seller > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

.footer__docs a { display: block; padding: 4px 0; color: var(--ink); }
.footer__docs a:hover { color: var(--bounds-ink); }

.footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--rule-soft);
  color: var(--muted);
  font-size: .84rem;
}

/* ---------- юридические страницы ---------- */
.doc { padding-block: clamp(40px, 7vw, 80px) clamp(64px, 9vw, 112px); }
.doc__inner { max-width: 780px; }
.doc__back {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: .92rem;
}
.doc__back:hover { color: var(--ink); }
.doc__title {
  color: var(--ink);
  font-family: var(--font-display);
  font-variation-settings: "wdth" 118;
  font-weight: 760;
  font-size: clamp(1.9rem, 4.4vw, 2.9rem);
  line-height: 1.06;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.doc__meta { margin-top: 14px; color: var(--muted); font-family: var(--font-mono); font-size: .8rem; }
.doc h2 {
  margin-top: 44px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}
.doc p { margin-top: 12px; }
.doc ul { margin-top: 10px; }
.doc ul li { position: relative; margin-top: 6px; padding-left: 20px; }
.doc ul li::before {
  content: "";
  position: absolute;
  left: 2px; top: .7em;
  width: 7px; height: 7px;
  border: 1.5px solid var(--bounds);
  border-radius: 1px;
}
.doc .seller { margin-top: 16px; }

/* ---------- анимации ---------- */
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes line-flash { from { background: var(--tint-pink); } to { background: transparent; } }
@keyframes progress { from { width: 8%; } to { width: 92%; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
