/* Owner review 19-20.10.2026: layout polish + header language picker + universal contact widget. */

/* 05 Companies: opening a <details> in the text column re-centred the grid and pushed
   the cafe picture down. Keep the art anchored to the top of the block. */
.company-grid { align-items:start; }

/* Developers block: the footer keeps only the details row. */
.integration-footer { grid-template-columns:minmax(0,1fr); border-top:0; padding-top:0; }

/* 05: one QR per screen (owner 19.10) - the overlay card and the separate QR block were removed. */
.company-art { padding-bottom:0; margin-bottom:0; }
.qr-try { margin:18px 0 0; }

/* Final dark block: the ghost button's hover turned the background light under light text (contrast 1.16). */
.full-night main > .final.final-story .btn-ghost:hover,
.full-night main > .final.final-story .btn-ghost:focus-visible {
  background:rgba(255,255,255,.12);
  color:#fff;
  border-color:rgba(255,255,255,.55);
}

/* Structure variant 19.10: delivery acks inside "Письма", extra facts as one expandable block. */
.tech-subtitle { margin:32px 0 0; font-size:18px; font-weight:650; letter-spacing:-.01em; }
#net .acks { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:14px; }
#net .acks li { min-width:0; padding:14px 16px; }
.tech-more { margin-top:28px; }
.tech-more .protocol-facts { margin:8px 0 18px; }
@media (max-width:700px) { #net .acks { grid-template-columns:minmax(0,1fr); } }

/* Structure variant v3 (owner 19.10 20:00) ----------------------------------------- */
.paper-story .apps-band { position:relative; background:#D6DCE4; padding-block:clamp(64px,7vw,100px) clamp(88px,9.5vw,128px); text-align:center; }
.paper-story .apps-band::before { content:""; position:absolute; inset:-28px 0 auto; height:40px; background:url("paper-20261012/assets/paper-edge-how.svg") top/100% 40px no-repeat; pointer-events:none; z-index:1; }
.paper-story .how::before { background-image:url("paper-20261012/assets/paper-edge-how-warm.svg"); }
.apps-band-title { margin:0 auto; max-width:20em; font-size:clamp(26px,3vw,40px); line-height:1.15; letter-spacing:-.03em; font-weight:650; }
.apps-band-lede { margin:14px auto 0; max-width:34em; font-size:clamp(16px,1.3vw,18px); color:var(--muted); }
.app-wall { list-style:none; padding:0; margin:clamp(32px,4vw,48px) auto 0; max-width:1180px; display:grid; grid-template-columns:repeat(8,minmax(0,1fr)); gap:12px; }
.app-tile { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; min-height:104px; padding:16px 8px 12px; background:var(--card); border:1px solid var(--line); border-radius:16px; }
.app-tile img, .app-tile-more svg { width:34px; height:34px; object-fit:contain; color:var(--muted); }
.app-tile-wide img { width:56px; height:34px; }
.app-tile b { font-size:14px; font-weight:650; letter-spacing:-.01em; color:var(--ink); line-height:1.2; }
.app-wall-more { display:block; margin:16px auto 0; font:650 15px/1.3 "Manrope",sans-serif; color:var(--accent-ink); background:var(--card); border:1px solid var(--line); border-radius:999px; padding:12px 22px; min-height:46px; cursor:pointer; }
.app-wall-more[hidden] { display:none; }
@media (max-width:1100px) { .app-wall { grid-template-columns:repeat(6,minmax(0,1fr)); } }
@media (max-width:820px) { .app-wall { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (max-width:640px) {
  .app-wall { grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; }
  .app-tile { min-height:84px; padding:12px 4px 10px; gap:7px; border-radius:14px; }
  .app-tile img, .app-tile-more svg { width:26px; height:26px; }
  .app-tile-wide img { width:44px; height:26px; }
  .app-tile b { font-size:11.5px; }
}
@media (max-width:360px) { .app-wall { gap:8px; } .app-tile b { font-size:11.5px; } }

/* Meet: its own block */
.meet-block .meet { margin-top:0; padding-top:0; border-top:0; }
.meet-block .meet-title { font-size:clamp(28px,3.2vw,44px); line-height:1.12; letter-spacing:-.03em; max-width:14em; }
.meet-block .meet-copy .kicker { margin-bottom:16px; }
.meet-link { display:inline-block; margin-top:18px; }
.meet-copy .more { margin-top:22px; }

/* Tabs that came from former blocks */
.tech-lede { margin:-6px 0 22px; font-size:16px; color:var(--muted); max-width:40em; }
.reviews-panel .rep-grid, .compare-panel .scale { margin-top:18px; }

/* Background rhythm: neighbours always differ. cool #D6DCE4 / warm #DCD8D2 / deep #CCD4DF */
body.paper-story main > section.block.how,
body.paper-story main > section.block.find,
body.paper-story main > section.block.company,
body.paper-story main > section.block.start,
body.paper-story main > section.block.community { background:#DCD8D2; }
body.paper-story main > section.block.team,
body.paper-story main > section.block.technical,
body.paper-story main > section.block.integrate,
body.paper-story main > section.block.faq { background:#D6DCE4; }
body.paper-story main > section.block.meet-block { background:#CCD4DF; }
.paper-story .start::before { background-image:url("paper-20261012/assets/paper-edge-start-warm.svg"); }

/* Kept from v2: wider "how it is built" block (three protocol cards side by side), dashed storage, mobile type. */
.editorial-story .technical > .wrap { max-width:1240px; }
.editorial-story main .technical .tech-panel.compare { background:none; }
.editorial-story .file-store { top:calc(22.5% - 42px); padding:12px 18px 10px; border:1.5px dashed var(--line-strong); border-radius:12px; }
@media (max-width:700px) { .editorial-story .file-store { top:calc(22.5% - 36px); padding:8px 8px 6px; } .editorial-story .file-store > svg { width:44px; height:44px; } main .kicker { font-size:12px; } .team-messenger { font-size:12px; } }

/* Header actions group: quiet language switcher + GitHub ------------- */
.top-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  position: relative;
}

.dark-first-screen .top .top-lang-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 40px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  box-shadow: none;
  color: rgba(214, 224, 245, 0.62);
  font: 600 12px/1 "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color .16s ease-out, background-color .16s ease-out;
}

.dark-first-screen .top .top-lang-btn:hover,
.dark-first-screen .top .top-lang-btn[aria-expanded="true"] {
  color: var(--hero-light);
  background: rgba(255, 255, 255, 0.06);
}

.top-lang-globe {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

@media (max-width: 559px) {
  .top-lang-globe { display: none; }
}

.top-lang-popover {
  position: absolute;
  top: 48px;
  right: 0;
  z-index: 70;
  width: min(468px, calc(100vw - 24px));
  max-height: min(78vh, 472px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: rgba(22, 27, 38, 0.96);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 8px 6px 8px 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  direction: ltr;
  scrollbar-width: thin;
  scrollbar-color: rgba(214, 224, 245, 0.26) transparent;
}

.top-lang-popover::-webkit-scrollbar {
  width: 6px;
}

.top-lang-popover::-webkit-scrollbar-track {
  background: transparent;
  margin-block: 8px;
}

.top-lang-popover::-webkit-scrollbar-thumb {
  background: rgba(214, 224, 245, 0.24);
  border-radius: 999px;
}

.top-lang-popover::-webkit-scrollbar-thumb:hover {
  background: rgba(214, 224, 245, 0.42);
}

.top-lang-popover[hidden] {
  display: none;
}

.top-lang-tile {
  appearance: none;
  border: 0;
  background: transparent;
  border-radius: 10px;
  min-width: 0;
  height: 35px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  gap: 6px;
  font: 500 13px/1.2 "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #F1F5F9;
  cursor: pointer;
  text-align: left;
  transition: background-color .12s ease-out;
}

.top-lang-tile span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-lang-tile:hover {
  background: rgba(255, 255, 255, 0.08);
}

.top-lang-tile b {
  width: 22px;
  flex: none;
  font-size: 11px;
  font-weight: 600;
  color: rgba(214, 224, 245, 0.52);
  text-transform: uppercase;
}

.top-lang-tile[aria-checked="true"] {
  background: rgba(255, 255, 255, 0.11);
  font-weight: 700;
}

.top-lang-tile[aria-checked="true"] b {
  color: #FFFFFF;
  font-weight: 700;
}

@media (max-width: 1050px) {
  .dark-first-screen .top .top-row {
    flex-wrap: nowrap;
    position: relative;
  }
  .dark-first-screen .top .mark {
    flex: 0 1 auto;
    min-width: 0;
    margin-right: auto;
  }
  .dark-first-screen .top .mark .mark-copy {
    width: fit-content;
    max-width: 176px;
    min-width: 0;
  }
  .dark-first-screen .top .mark .mark-name {
    width: 100%;
  }
  .dark-first-screen .top .top-actions {
    order: 1;
    margin-right: 6px;
    flex: none;
  }
  .dark-first-screen .top .top-actions .top-lang-btn {
    order: 0;
  }
  .dark-first-screen .top .top-actions .github-header {
    order: 1;
    margin-right: 0;
  }
  .dark-first-screen .top .menu {
    order: 2;
    flex: none;
  }
  .dark-first-screen .top #nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    padding: 4px var(--pad) 12px;
    background: #141C2B;
    border-top: 1px solid #253047;
    border-bottom: 1px solid #34435F;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    z-index: 60;
  }
}

@media (max-width: 700px) {
  .dark-first-screen .top .mark {
    gap: 8px;
  }
  .dark-first-screen .top .mark b {
    font-size: 24px;
    flex: none;
  }
  .dark-first-screen .top .mark .mark-copy {
    width: fit-content;
    max-width: 146px;
  }
  .dark-first-screen .top .mark .mark-name {
    font-size: 11.5px;
  }
  .dark-first-screen .top .mark .mark-definition {
    font-size: 10.5px;
    line-height: 1.25;
  }
  .dark-first-screen .top .top-actions {
    gap: 4px;
    margin-right: 4px;
  }
  .dark-first-screen .top .top-actions .github-header {
    min-width: 38px;
    min-height: 38px;
    width: 38px;
    height: 38px;
  }
  .dark-first-screen .top .top-actions .top-lang-btn {
    height: 38px;
    padding: 0 7px;
  }
  .dark-first-screen .top .menu {
    width: 38px;
    height: 38px;
    min-height: 38px;
  }
}

@media (max-width: 359px) {
  .dark-first-screen .top .mark .mark-copy {
    max-width: 118px;
  }
}

@media (max-width: 640px) {
  .top-lang-popover {
    position: fixed;
    top: 68px;
    left: 10px;
    right: 10px;
    width: auto;
    max-width: none;
    max-height: min(72vh, 396px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Custom scrollbars aligned with the A4A editorial paper & dark-hero design system -- */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(24, 22, 20, 0.30) #D6DCE4;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #D6DCE4;
}

::-webkit-scrollbar-thumb {
  background: rgba(24, 22, 20, 0.28);
  border-radius: 999px;
  border: 2px solid #D6DCE4;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(24, 22, 20, 0.44);
}

pre,
.code,
[data-installer-command],
.manual,
.installer-feedback textarea,
.copy-feedback textarea {
  scrollbar-width: thin;
  scrollbar-color: rgba(24, 22, 20, 0.24) transparent;
}

pre::-webkit-scrollbar,
.code::-webkit-scrollbar,
[data-installer-command]::-webkit-scrollbar,
.manual::-webkit-scrollbar,
.installer-feedback textarea::-webkit-scrollbar,
.copy-feedback textarea::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

pre::-webkit-scrollbar-track,
.code::-webkit-scrollbar-track,
[data-installer-command]::-webkit-scrollbar-track,
.manual::-webkit-scrollbar-track,
.installer-feedback textarea::-webkit-scrollbar-track,
.copy-feedback textarea::-webkit-scrollbar-track {
  background: transparent;
}

pre::-webkit-scrollbar-thumb,
.code::-webkit-scrollbar-thumb,
[data-installer-command]::-webkit-scrollbar-thumb,
.manual::-webkit-scrollbar-thumb,
.installer-feedback textarea::-webkit-scrollbar-thumb,
.copy-feedback textarea::-webkit-scrollbar-thumb {
  background: rgba(24, 22, 20, 0.22);
  border-radius: 999px;
  border: 0;
}

pre::-webkit-scrollbar-thumb:hover,
.code::-webkit-scrollbar-thumb:hover,
[data-installer-command]::-webkit-scrollbar-thumb:hover,
.manual::-webkit-scrollbar-thumb:hover,
.installer-feedback textarea::-webkit-scrollbar-thumb:hover,
.copy-feedback textarea::-webkit-scrollbar-thumb:hover {
  background: rgba(24, 22, 20, 0.38);
}

/* Floating A4A Universal Contact Widget (bottom-right) ------------------------------ */
.a4a-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.22s ease-out, transform 0.22s ease-out, visibility 0.22s;
}

.a4a-widget.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.a4a-widget-fab {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: #111827;
  color: #FFFFFF;
  padding: 10px 16px 10px 13px;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  box-shadow: 0 12px 28px -8px rgba(17, 24, 39, 0.45);
  transition: transform 0.15s ease-out, background-color 0.15s ease-out;
}

.a4a-widget-fab:hover {
  background: #1F2937;
  transform: translateY(-1px);
}

.a4a-fab-icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: #93C5FD;
  stroke-width: 1.8;
}

.a4a-fab-icon path {
  fill: #93C5FD;
  stroke: none;
}

.a4a-fab-label {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
}

.a4a-widget-panel {
  width: min(356px, calc(100vw - 24px));
  background: #FFFFFF;
  color: #111827;
  border: 1px solid #E5E7EB;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 20px 44px -12px rgba(17, 24, 39, 0.24);
  display: grid;
  gap: 12px;
}

.a4a-widget-panel[hidden] {
  display: none;
}

.a4a-w-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.a4a-w-head b {
  font-size: 16px;
  font-weight: 760;
  letter-spacing: -0.015em;
  color: #111827;
}

.a4a-w-close {
  appearance: none;
  border: 0;
  background: #F3F4F6;
  color: #4B5563;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.a4a-w-close:hover {
  background: #E5E7EB;
  color: #111827;
}

.a4a-w-qr-row {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: center;
}

.a4a-w-qr {
  display: block;
  width: 84px;
  height: 84px;
  padding: 5px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 12px;
  transition: border-color 0.14s ease-out;
}

.a4a-w-qr:hover {
  border-color: #111827;
}

.a4a-w-qr svg {
  width: 100%;
  height: 100%;
  display: block;
}

.a4a-w-qr .qrline {
  stroke: #111827;
}

.a4a-w-lead {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: #4B5563;
}

.a4a-w-box {
  background: #F8FAFC;
  border: 1px solid #CBD5E1;
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 7px;
}

.a4a-w-box-main {
  margin: 0;
  font-size: 13px;
  line-height: 1.38;
  font-weight: 650;
  color: #111827;
}

.a4a-w-box-tech {
  padding-top: 7px;
  border-top: 1px dashed #CBD5E1;
  display: grid;
  gap: 4px;
  font-size: 11px;
  line-height: 1.35;
  color: #6B7280;
}

.a4a-w-box-tech code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10.5px;
  color: #111827;
  word-break: break-all;
}

.a4a-w-submit {
  appearance: none;
  border: 0;
  border-radius: 11px;
  background: #111827;
  color: #FFFFFF;
  min-height: 44px;
  padding: 10px 14px;
  font: 700 13.5px/1.2 "Manrope", sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  transition: background-color 0.14s ease-out;
}

.a4a-w-submit:hover {
  background: #1F2937;
}

.a4a-w-submit.is-copied {
  background: #059669;
}

.a4a-w-submit svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

@media (max-width: 640px) {
  .a4a-widget {
    right: 12px;
    bottom: 12px;
  }
  .a4a-widget-fab {
    padding: 8px 13px 8px 11px;
    min-height: 42px;
    gap: 7px;
  }
  .a4a-fab-label {
    font-size: 12.5px;
  }
}

/* Multi-language hero speech bubbles: dynamic contour + safe max-width wrapping --- */
.hero .bubble {
  width: max-content;
  max-width: min(47%, 284px);
  white-space: normal;
  box-sizing: border-box;
}

.hero .bubble .who,
.hero .bubble .say {
  white-space: normal;
  overflow-wrap: break-word;
}

@media (max-width: 700px) {
  .hero .bubble {
    max-width: min(48%, 216px);
  }
  .hero .bubble .say {
    font-size: 16.5px;
    line-height: 1.18;
  }
}


@media (max-width: 900px) {
  .relay-wire .relay-node + .relay-node {
    display: none;
  }
}

@media (max-width: 700px) {
  .dark-first-screen .hero .scene figcaption {
    position: relative;
    z-index: 3;
    margin: -22px var(--pad) 38px auto;
  }
}
