/* Stingray — the soft, iOS-like layer over the house style (S5, 22 Oct 2026; Feliks: «их аля iOS дизайн можешь перенять»).
   Colours, type and layout stay as RULE v3 §12 defines them; this file only rounds shapes, softens shadows and adds motion.
   No blue. Loaded last on every page. */

/* buttons: pills */
.btn, .btn-solid, .btn-line, .btn-ghost, .btn-sm,
.go, .nav-m > summary, form[name=contact] button, form[name=contact] [type=submit] {
  border-radius: 999px !important;
}
.btn, .btn-solid, .btn-line, .btn-ghost, form[name=contact] button {
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.btn:hover, .btn-solid:hover, .btn-line:hover, .btn-ghost:hover, form[name=contact] button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(6, 12, 13, .14);
}
.pj .go { padding-inline: 20px !important; }

/* fields */
form[name=contact] input:not([type=checkbox]):not([type=radio]):not([type=range]), form[name=contact] select, form[name=contact] textarea {
  border-radius: 12px !important;
}

/* pictures and cards: soft corners */
.rgrid img, .rgrid a, .m img, .side img, .jr .j, .jr .j img, .lib .c,
main figure:not(.shot) > img, article figure:not(.shot) > img, figure.sv-chart, figure.sv-chart img,
.card, .tile, .mod img {
  border-radius: 16px;
}
.rgrid a, .jr .j, .lib .c, .card, .tile { overflow: hidden; }
.rgrid a img { transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.rgrid a:hover img { transform: scale(1.04); }

/* small round controls */
#sy-top { border-radius: 50% !important; }
#sy-b { border-radius: 999px !important; }
.sy-fsoc a { border-radius: 12px !important; }

/* menu panel on phones */
.nav-m-p { border-radius: 0 0 20px 20px; }

@media (prefers-reduced-motion: reduce) {
  .btn, .btn-solid, .btn-line, .btn-ghost, .rgrid a img { transition: none !important; transform: none !important; }
}

/* contrast to WCAG AA (axe, 22 Oct): quiet greys one step darker, contact notes at full strength */
footer .fh, footer .cols > div:first-child p { color: #5C676A !important; }
.faq-topics .n { color: #5C676A !important; opacity: 1 !important; }
#contact .small.rv.in { opacity: 1 !important; }

/* the short pages (404, thanks): pill buttons; the social strip at the top is retired everywhere — socials live in the footers */
body > div > a:not(.rb), body > div > span > a { border-radius: 999px !important; }
.sy-libar { display: none !important; }

/* decorative section numbers: enough contrast to read (axe, 29 Oct) */
.marker > b { opacity: .55 !important; }

/* Ask Marina on phones: a round chat button instead of the wide pill, so it no longer hides lines of text (QA 29 Oct) */
@media (max-width: 700px) {
  #sy-b { width: 56px; height: 56px; padding: 0 !important; font-size: 0 !important; letter-spacing: 0 !important;
          border-radius: 50% !important; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 22px rgba(6,12,13,.35) !important; }
  #sy-b::before { content: ""; width: 26px; height: 26px; background: #fff;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5h16v10H9.5L5 19.5v-4H4z'/%3E%3Cpath d='M8 9.5h8M8 12.5h5'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5.5h16v10H9.5L5 19.5v-4H4z'/%3E%3Cpath d='M8 9.5h8M8 12.5h5'/%3E%3C/svg%3E") center / contain no-repeat; }
}

/* the logo link never takes the browser's link colour */
a.logo, a.brand { color: inherit; }

/* e-mail addresses never break at their hyphen */
a[href^="mailto:"]:not([class]) { white-space: nowrap; }

/* headings: balanced lines, no single word left alone on the last line (QA 29 Oct) */
h1, h2, h3 { text-wrap: balance; }

/* render galleries with an odd count (GERRIS: 7): the first picture runs full width, so no picture is left alone on the last row */
.rgrid > a:first-child:nth-last-child(7), .rgrid > a:first-child:nth-last-child(5) { grid-column: 1 / -1; }

/* ORIGAMI cover: the wordmark stays legible over the hull render (QA 29 Oct) */
.cover h1.mark img { filter: drop-shadow(0 2px 14px rgba(0,0,0,.7)) brightness(1.18); }
@media (max-width: 700px) { .sec.dark.cover .scrim { background: linear-gradient(to top, rgba(6,12,13,.86), rgba(6,12,13,.62)) !important; } }

/* refit, ORIGAMI, legal and privacy pages: header and footer on the same side margins as every other page (QA 29 Oct) */
header.nav.syc .nav-in { padding-left: clamp(20px, 4.2vw, 72px) !important; padding-right: clamp(20px, 4.2vw, 72px) !important; }
footer.syc .wrap { max-width: none !important; padding-left: clamp(20px, 4.2vw, 72px) !important; padding-right: clamp(20px, 4.2vw, 72px) !important; }

/* home journal row: the «all articles» card reads as a deliberate link, not a missing picture (QA 29 Oct) */
.jr .j.all { justify-content: center !important; align-items: center; text-align: center; background: rgba(255,255,255,.06); }
.jr .j.all .jt { font-size: 19px; padding: 22px; }

/* home menu on phones: a wide sheet under the menu button, scrollable, nothing cut off (QA 29 Oct) */
@media (max-width: 640px) {
  .top .tmenu .tp { width: calc(100vw - 24px); max-width: none; min-width: 0 !important; box-sizing: border-box; inset-inline-end: -22px !important;
                    max-height: calc(100dvh - 120px); overflow-y: auto; }
}

/* wide tables on phones scroll sideways inside their own box instead of being cut off (QA 29 Oct) */
@media (max-width: 700px) {
  main table, article table, .sec table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* the configurator's bottom total bar: the chat button rides above it (QA 29 Oct) */
@media (max-width: 1100px) { body:has(.mbar) #sy-c { bottom: 96px !important; } }
/* Lab tiles SEPIA · ORIGAMI · NUMBERS BEFORE STEEL scale with their width, not the screen height
   (Feliks 29 Nov 2026 «баннеры гигантских размеров не масштабировались»): before, each was 86 % of the
   screen height — 1175 px tall on a tablet, three phone screens in a row on a phone */
html body .lab .tiles{height:auto;min-height:0}
html body .lab .t{min-height:0;max-height:none;width:auto;justify-self:stretch;aspect-ratio:auto;height:min(41.6vw,88svh);padding:clamp(24px,3.6vw,64px)}
html body .lab .t::after{inset:clamp(10px,1.4vw,20px)}
/* 29 Nov, wide screens: the page gutter (--g) grew to 280-920 px inside the tile and left the words 0 px; tiles keep their own padding */
/* 29 Nov fix: no max-height with aspect-ratio — on a short window it narrowed the tiles and squeezed the words */
@media(max-width:1100px) and (min-width:641px){html body .lab .t{height:auto;aspect-ratio:3/4}}
@media(max-width:640px){html body .lab .t{height:auto;aspect-ratio:1/1}}
