/* Language switch + Hebrew (right-to-left) adjustments, shared by every page. */
.lang-toggle{font:inherit;font-weight:600;font-size:.85rem;color:inherit;background:transparent;border:1px solid currentColor;border-radius:999px;padding:3px 12px;cursor:pointer;opacity:.85;line-height:1.4}
.lang-toggle:hover,.lang-toggle:focus-visible{opacity:1}

/* Hebrew typography: the Latin fonts have no Hebrew letters, so swap in Hebrew families. */
html[lang="he"]{
  --display:"Rubik","Bricolage Grotesque",Arial,sans-serif;
  --body:"Frank Ruhl Libre","Source Serif 4",Georgia,serif;
  --mono:"Rubik","IBM Plex Mono",ui-monospace,monospace;
}
/* Wide letter-spacing and all-caps styling suit Latin labels, not Hebrew. */
html[lang="he"] .eyebrow,html[lang="he"] .pill,html[lang="he"] .label,html[lang="he"] .pc-meta,
html[lang="he"] .date .dow,html[lang="he"] .date .mon,html[lang="he"] .soon,html[lang="he"] .pc-wd,
html[lang="he"] h1,html[lang="he"] h2,html[lang="he"] h3{letter-spacing:0}

/* Right-to-left layout fixes for things that were placed with left/right. */
html[dir="rtl"] .pc-form{text-align:right}
html[dir="rtl"] .pc-link{align-self:flex-start}
html[dir="rtl"] input[type="tel"],html[dir="rtl"] input[type="email"],html[dir="rtl"] input[type="url"]{direction:ltr;text-align:right}
html[dir="rtl"] .soon{right:auto;left:-16px;transform:rotate(-8deg)}
@media (max-width:820px){html[dir="rtl"] .soon{left:-6px}}
html[dir="rtl"] .pc-nav{transform:scaleX(-1)}
/* Hidden spam-trap fields sit far off to the left; in right-to-left pages that would create a huge sideways scroll. */
html[dir="rtl"] .hp{left:auto;right:-9999px}
/* Header: logo and menu tabs together at the start, language switch alone at the far end.
   On phones the switch moves up into the logo row (top corner) and the tabs wrap below. */
header.top .wrap{justify-content:flex-start}
header.top nav.links{margin-inline-start:clamp(16px,3vw,36px)}
header.top .lang-toggle{margin-inline-start:auto;flex:none}
@media (max-width:560px){
  header.top nav.links{order:3;margin-inline-start:0}
  header.top .lang-toggle{order:2}
}
/* Phones: the switch always sits in the top-right corner, in both languages
   (in Hebrew the logo moves to the left of that row; the tabs below stay right-to-left). */
@media (max-width:560px){
  html[dir="rtl"] header.top .wrap{direction:ltr}
  html[dir="rtl"] header.top nav.links{direction:rtl}
}
