﻿/* Hebrew (RTL) layer, loaded after shared.css and the page styles on /he/ pages only.
   Grid and flex mirror by themselves under dir="rtl"; this file mirrors only what is placed with physical
   left / right / translateX, so every edge keeps the same distance from its mirrored side. */

/* Hebrew letters come from Heebo (@font-face in shared.css); Latin keeps Inter and JetBrains Mono */
:root { --sans: Inter, Heebo, "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
        --mono: "JetBrains Mono", Heebo, "Courier New", monospace; }
/* Hebrew has no letter-spaced capitals: the eyebrow labels keep their size without the tracking */
[dir="rtl"] .eyebrow { letter-spacing: 0; }

/* Latin runs inside Hebrew text (product names, numbers with units) */
bdi, .ltr { unicode-bidi: isolate; direction: ltr; }
bdi[dir="rtl"] { direction: rtl; }   /* a stat number with a Hebrew word, "31 שניות": the number reads first, on the right */
/* a hyphenated Latin term kept on one line, e.g. (Lug-Rod-Bracket) (Ilya 2026-10-31) */
.nowrap { white-space: nowrap; }
/* below the narrowest common phone (360 px) a long term may wrap rather than run out of its card */
@media (max-width: 359px) { .nowrap { white-space: normal; } }
/* a long name kept on one line only where the card fits it: "ב-Structural Repair Manual" in the 737 Result
   overflows its card below a 377 px viewport (measured 2026-11-03), so narrower phones may break it */
@media (min-width: 380px) { .nowrap-wide { white-space: nowrap; } }
/* a long English phrase in brackets inside Hebrew text: one box that moves to the next line as a whole, so a line
   break never splits it and leaves its brackets on the wrong side (Ilya 2026-11-02, King Air ASIO) */
.ltr-box { display: inline-block; direction: ltr; unicode-bidi: isolate; }
/* a box that wraps inside itself (phone) keeps its English lines on the right edge, like the Hebrew lines around it (Ilya 2026-11-15) */
.ltr-box { text-align: right; }
/* an inline-block does not take the underline of the link around it, so a box inside a link copies it (Ilya 2026-11-06) */
a .ltr-box { text-decoration: inherit; }
/* an LTR box with the comma after it (build_he glue_punctuation): the mark never starts a line alone, the box still wraps inside */
.glue { white-space: nowrap; }
.glue > .ltr-box { white-space: normal; max-width: calc(100% - .5em); }   /* room for the mark beside a full-width box */

/* stat numbers like "15+" and "3x+": kept LTR so the plus stays after the number, still aligned to the right edge */
[dir="rtl"] .stat .num, [dir="rtl"] .pstats .num { direction: ltr; text-align: right; }   /* "5+" stays "5+" */
/* official English title, Hebrew title under it (glossary section 3) */
[dir="rtl"] .position h3[dir="ltr"] { text-align: right; }
.he-title { color: var(--body); font-size: 15px; line-height: 22px; margin-top: 2px; }

/* ---------- shared.css ---------- */
[dir="rtl"] .position ul.results { padding-left: 0; padding-right: 20px; }
[dir="rtl"] .rl-in { margin-left: 0; margin-right: -0.85em; }
[dir="rtl"] .ri::before { padding-left: 0; padding-right: 0.14em; text-align: right; }

/* ---------- home page: hero ---------- */
/* text column on the right, spotlight in the space to its left (mirror of the English page) */
/* wide screens only: below 1024 px the spotlight is centred under the text, which needs no mirroring */
@media (min-width: 1024px) { [dir="rtl"] .hero .plane { left: auto; right: calc(var(--tr) - var(--w) * 0.08); } }

/* ---------- home page: sections and sidebar ---------- */
[dir="rtl"] .section + .section::before { left: auto; right: 0; }
[dir="rtl"] .sidebar-plane .cap { left: auto; right: 0; }

/* ---------- home page: career spine ---------- */
[dir="rtl"] .spine::before, [dir="rtl"] .spine::after { left: auto; right: calc(var(--axis) - 1px); }
[dir="rtl"] .era-head .eyebrow { padding-left: 0; padding-right: 32px; }
[dir="rtl"] .node .when { text-align: right; }
[dir="rtl"] .node .when .dt i::before { left: auto; right: 0; }
[dir="rtl"] .node .when .dt:first-child i::after { left: auto; right: 5px; }
[dir="rtl"] .node .when .rng:first-child::after { left: auto; right: calc(100% + 1px); }
[dir="rtl"] .node .when .rng + .rng::before { left: auto; right: 24px; }
[dir="rtl"] .node .dot { left: auto; right: calc(var(--axis) - var(--dot) / 2); }
[dir="rtl"] .node::after { left: auto; right: calc(var(--axis) + var(--dot) / 2); }
[dir="rtl"] .node .body-col { padding-left: 0; padding-right: 32px; }
@media (hover: hover) { [dir="rtl"] .position.linked:hover a.stretch .arr { transform: translateX(-4px); } }

/* ---------- home page: tools marquee ---------- */
/* the loop moves the track by half its width to the left, measured from the row's left edge; the row itself must be
   LTR, or the overflowing track hangs from the right edge and the reverse row starts empty (Ilya 2026-10-31) */
[dir="rtl"] .trow { direction: ltr; }

/* ---------- project pages ---------- */
[dir="rtl"] .did { padding-left: 0; padding-right: 20px; }
[dir="rtl"] .pnav .next { text-align: left; }
/* the slideshow runs right to left (Ilya 2026-11-01): the next slide comes in from the left, "next" is the left button.
   build_he.py adapts the script (|scrollLeft|, arrow keys) and swaps the button glyphs; the counter stays "01 / 08" */
[dir="rtl"] .gbar .count { direction: ltr; unicode-bidi: isolate; }
@media (max-width: 767px) { [dir="rtl"] .pnav .next { text-align: right; } }
/* "hover: results" badge on the swap slides (Elbit gallery, SkyStriker): top left corner instead of top right */
[dir="rtl"] .swaphint { right: auto; left: 12px; }
/* module badge (PP, SA, ...): the gap goes on the text side */
[dir="rtl"] .mbadge { margin-right: 0; margin-left: 8px; }
/* SAW pipeline arrows: steps run right to left, so the arrow sits on the left of each step and points left */
[dir="rtl"] .pipe .steps li:not(:last-child)::after { content: "\2190"; right: auto; left: -19px; }
@media (max-width: 1023px) {
  [dir="rtl"] .pipe .steps li:not(:last-child)::after { content: ""; left: auto; right: 24px; }
}

/* ---------- narrow screens ---------- */
/* .mnav (burger bar, 2026-11-07) mirrors by itself: margin-inline-start and flex order flip with dir="rtl" */
@media (max-width: 767px) {
  [dir="rtl"] .era-head .eyebrow { padding-left: 0; padding-right: 28px; }
  [dir="rtl"] .node .when { padding: 0 28px 8px 0; }
  [dir="rtl"] .node .when .rng { margin-right: 0; margin-left: 8px; }
  [dir="rtl"] .node .body-col { padding-left: 0; padding-right: 28px; }
}
