/* «מסר בשנייה» (second): the layer Achiya chose on 24.11.2026 («מלוטש») over every public page of onimli.com.
   second.js puts html.s2-page on a page it shapes and html.s2-on when it is done. Nothing is removed: whatever is hidden
   here is one tap away, where it was. Every value comes from the site's own tokens (family.css): ink, dial yellow,
   cream paper, the leaf corner.
   The same two files serve the bot's pages from wa-bot-saas (public/assets/js/second.js, css/second.css): a change here
   goes there too. */

/* a page that is about to be shortened waits for the layer, so its long version never flashes. The wait rides on the
   head's own nav-pending, which every page drops at DOMContentLoaded or after two seconds: a script that never comes
   leaves the page as it always was. Layout is kept, so nothing moves when the page shows. */
html.nav-pending:not(.s2-on) main { opacity: 0; }
/* the bot's pages (wa-bot-saas, /bot/) take no inline script, so they have no nav-pending: there the same wait is CSS
   alone, only in a browser that runs scripts, and it gives up by itself after a second and a half */
@media (scripting: enabled) {
  html[data-service="bot"]:not(.s2-on) main { animation: s2-hold 1.5s step-end both; }
  @keyframes s2-hold { from { opacity: 0; } }
}

/* ═══ short ═══ */
.s2-cut:not(.is-open) .s2-rest, .s2-tail:not(.is-open), .s2-item:not(.is-open) .s2-detail, .s2-sep,
.s2-long:not(.is-open) > .s2-extra, .s2-trim:not(.is-open) .s2-extra, .s2-levels:not(.is-open) > .s2-extra { display: none !important; }

/* «עוד»: a word in the family's own marker, at the end of the sentence that stays */
.s2-more { -webkit-appearance: none; appearance: none; box-sizing: content-box; margin: -8px 0; margin-inline-start: 0.45em; border: 0; border-radius: 2px; padding: 8px 3px; background: linear-gradient(transparent 56%, var(--yellow, #ffe81a) 56%, var(--yellow, #ffe81a) 90%, transparent 90%) content-box; color: var(--ink, #1b1a17); font: inherit; font-family: var(--f-ui, inherit); font-size: 0.93em; white-space: nowrap; cursor: pointer; }
.s2-more:hover { background: var(--yellow, #ffe81a) content-box; }
.s2-more--block { display: inline-block; margin: 12px 0 0; font-size: 16px; line-height: 1.4; }
.s2-more--levels { display: block; margin: 18px auto 0; }
.s2-moreli { display: block !important; margin: 0 !important; border: 0 !important; padding: 0 !important; background: none !important; list-style: none; }
.s2-moreli::before, .s2-moreli::after { content: none !important; }
.s2-moreli .s2-more--block { margin-top: 2px; }
/* on a night panel the marker has nothing to sit on: the word gets the whole yellow */
.s2-more--dark, .s2-more--dark:hover { position: relative; border-radius: 6px; padding: 3px 9px; background: var(--yellow, #ffe81a); }
.s2-more--dark:not(.s2-more--block) { margin-block: -3px; }
.s2-more--dark::after { content: ""; position: absolute; inset: -9px -4px; }

/* a list of named things: the names stay, a tap opens the words under one */
.s2-item { cursor: pointer; }
.s2-item .s2-detail { cursor: auto; }
.s2-title { display: flex !important; align-items: center; justify-content: space-between; gap: 12px; }
span.s2-detail { display: block; margin-top: 4px; }
/* a quiet plus: fifteen of them in one card must not read as fifteen buttons */
.s2-plus { -webkit-appearance: none; appearance: none; position: relative; flex: none; box-sizing: border-box; width: 26px; height: 26px; margin: 0; border: 0; border-radius: 50%; padding: 0; background: linear-gradient(var(--ink, #1b1a17), var(--ink, #1b1a17)) center / 10px 2px no-repeat, linear-gradient(var(--ink, #1b1a17), var(--ink, #1b1a17)) center / 2px 10px no-repeat; background-color: var(--ivory, #f6f0df); cursor: pointer; transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.22s ease; }
.s2-plus::after { content: ""; position: absolute; inset: -10px; }
@media (hover: hover) { .s2-item:hover .s2-plus { background-color: var(--yellow, #ffe81a); } }
.s2-item.is-open .s2-plus { transform: rotate(45deg); background-color: var(--yellow, #ffe81a); }
.s2-plus:focus-visible, .s2-more:focus-visible, .s2-read__b:focus-visible { outline: 2px solid var(--ink, #1b1a17); outline-offset: 2px; }

/* the fold of a section: the site's own «בפירוט» row */
.s2-fold > :last-child { margin-bottom: 18px; }
.s2-fold--h3 > summary > h3 { margin: 0; font: inherit; }
.s2-fold--h3 > summary > h3::before { content: none; }
.s2-fold--h3 { margin-top: 0; }
.s2-fold--h3 + .s2-fold--h3 { border-top: 0; }
h2 + .s2-fold--h3 { margin-top: 18px; }

/* «בקצרה | הכול»: the whole page at once */
.s2-read { display: inline-flex; gap: 2px; margin-top: 4px; padding: 3px; background: var(--ivory, #f6f0df); border-radius: 999px; }
.s2-read__b { -webkit-appearance: none; appearance: none; margin: 0; border: 0; padding: 0 18px; height: 40px; border-radius: 999px; background: none; color: var(--ink, #1b1a17); font: 15px/1 var(--f-ui, inherit); cursor: pointer; }
.s2-read__b.is-on { background: var(--ink, #1b1a17); color: var(--on-band, #fbf6e8); }
.s2-flow > .s2-read + h2, .s2-flow > .s2-read + .s2-pic { margin-top: 36px; }

/* the link cloud at the foot of a page (a <nav>): one row to slide. A sentence that carries the same class (the bot's «ממשפחת עונים לי») keeps its lines */
html.s2-page nav.more { flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, transparent, #000 36px); mask-image: linear-gradient(to right, transparent, #000 36px); padding-inline-end: 36px; }
html.s2-page nav.more:dir(ltr) { -webkit-mask-image: linear-gradient(to left, transparent, #000 36px); mask-image: linear-gradient(to left, transparent, #000 36px); }
html.s2-page nav.more::-webkit-scrollbar { display: none; }
html.s2-page nav.more > * { flex: none; }

/* a table wider than the phone: its far edge fades for as long as there is more of it to slide to (second.js, edges) */
.s2-edge { -webkit-mask-image: linear-gradient(to right, transparent, #000 48px); mask-image: linear-gradient(to right, transparent, #000 48px); }
.s2-edge:dir(ltr) { -webkit-mask-image: linear-gradient(to left, transparent, #000 48px); mask-image: linear-gradient(to left, transparent, #000 48px); }

/* the blog index: one line under each title */
html.s2-page .posts__ex { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; overflow: hidden; }

/* ═══ drawn ═══ */
.s2-pic { display: block; width: 96px; height: 78px; margin: 54px 0 0; object-fit: contain; object-position: right center; }
.s2-pic:dir(ltr) { object-position: left center; }
.s2-pic.s2-pic--center { margin-inline: auto; object-position: center; }
.s2-flow > h2.s2-has-pic { margin-top: 8px; }
.s2-flow > .s2-pic:first-child { margin-top: 0; }
section.chapter .s2-pic { margin: 0 0 6px; }

/* ═══ polished ═══ */
html.s2-page :is(h1, h2, h3, .pr__name, .posts__title, summary) { text-wrap: balance; }
html.s2-page :is(p, li, dd) { text-wrap: pretty; }

/* the sentence that stays under a heading reads as the heading's own line */
html.s2-page .s2-flow > h2 + p, html.s2-page .s2-flow > h2 + p.s2-cut { font-size: 19px; line-height: 1.65; color: var(--ink, #1b1a17); max-width: 34em; }

/* rows that open: a soft pill, not a stripe across the page */
html.s2-page .more-details { border: 0; margin-top: 16px; }
html.s2-page .more-details > summary { display: inline-flex; justify-content: flex-start; gap: 10px; padding: 8px 16px; padding-inline-end: 8px; background: var(--ivory, #f6f0df); border-radius: 999px; font-size: 15.5px; transition: background-color 0.2s ease; }
html.s2-page .more-details > summary:hover { background: var(--yellow, #ffe81a); }
html.s2-page .more-details > summary::after { width: 26px; height: 26px; background-size: 10px 2px, 2px 10px; background-color: var(--sheet, #fffdf7); }
html.s2-page .more-details[open] > summary::after { background-color: var(--yellow, #ffe81a); }
html.s2-page .more-details[open] > summary { margin-bottom: 6px; }
html.s2-page .drawn + .more-details { margin-top: 18px; }
html.s2-page .s2-fold--h3 { margin-top: 10px; }
html.s2-page .s2-fold--h3 > summary { display: flex; justify-content: space-between; border-radius: var(--leaf-xs, 12px 4px 12px 4px); padding: 12px 16px; padding-inline-end: 10px; font-size: 17px; }

/* questions: a box for each, no ruled lines */
html.s2-page .faq details { margin-top: 10px; border: 0 !important; padding: 16px 18px; background: var(--sheet, #fffdf7); border-radius: var(--leaf-sm, 18px 6px 18px 6px); box-shadow: 0 0 0 1px var(--hair, rgba(27, 26, 23, 0.14)); transition: box-shadow 0.2s ease; }
html.s2-page .faq details[open] { box-shadow: 0 0 0 1.5px var(--ink, #1b1a17); }
html.s2-page .faq summary { font-size: 18px; }
html.s2-page .faq summary::after { width: 30px; height: 30px; background-size: 11px 2px, 2px 11px; }
html.s2-page .facts.faq > li { display: block; border: 0; padding: 0; }
html.s2-page :is(.steps, .rows) > li { border-color: transparent; }
html.s2-page .posts li { border-bottom-color: transparent; }
html.s2-page .s2-titled.steps > li, html.s2-page .s2-titled.rows > li { padding-block: 12px; }

/* the one moment of motion: the object over a heading lands as its section comes into view */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    html.s2-page .s2-pic { animation: s2-land linear both; animation-timeline: view(); animation-range: entry 0% entry 90%; transform-origin: 80% 100%; }
    @keyframes s2-land { from { opacity: 0; transform: translateY(22px) rotate(-9deg) scale(0.84); } 55% { opacity: 1; transform: translateY(-3px) rotate(1.5deg) scale(1.02); } to { opacity: 1; transform: none; } }
  }
  @supports selector(::details-content) {
    html.s2-page { interpolate-size: allow-keywords; }
    html.s2-page :is(.more-details, .faq details)::details-content { block-size: 0; overflow: clip; opacity: 0; transition: block-size 0.34s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.26s ease, content-visibility 0.34s allow-discrete; }
    html.s2-page :is(.more-details, .faq details)[open]::details-content { block-size: auto; opacity: 1; }
  }
}
