/* Shared styles for the /shealot/ pages (Q&A articles).
   Copied from the <style> block of /index.html — tokens, base, glass, switch,
   buttons, nav, section heads, faq, footer, dock, reveal. If those change on the
   main page, change them here too. Article-only styles are at the bottom. */
/* ============================================================
   פיקאצ'ו עבודות חשמל — design tokens
   Concept: "לוח מכשור" / instrument panel.
   Deep dark shell, electric-yellow accent, frosted glass surfaces.
   Toggles read as breaker switches — the brand's own metaphor.
   ============================================================ */
:root {
  /* brand */
  --y:        #FFC91E;
  --y-hi:     #FFE070;
  --y-deep:   #E8A800;
  --y-glow:   rgba(255, 201, 30, .38);
  /* accent used as TEXT/ICON rather than as a fill. On dark it can stay bright;
     on paper the brand yellow is ~1.6:1, so light mode swaps in a dark amber. */
  --y-ink:    #FFC91E;
  /* error red, same two-token trick as --y-ink: no single red clears 4.5:1
     on BOTH the near-black shell and the paper background. */
  --bad:      #E5484D;   /* 5.1:1 on --bg */
  --lit-1:    #FFE070;
  --lit-2:    #FFC91E;
  --lit-3:    #E8A800;

  /* dark shell (default) */
  --bg:       #08090C;
  --bg-2:     #0C0E13;
  --ink:      #F3F4F7;
  --ink-2:    #B6BCC7;
  --ink-3:    #7E858F;

  --glass:      rgba(255,255,255,.045);
  --glass-2:    rgba(255,255,255,.075);
  --rim:        rgba(255,255,255,.10);
  --rim-strong: rgba(255,255,255,.18);
  --sheen:      rgba(255,255,255,.55);

  --track-off:  rgba(255,255,255,.10);
  --track-rim:  rgba(255,255,255,.14);
  --knob:       #FFFFFF;
  --on-ink:     #0A0B0F;

  --shadow-1: 0 1px 2px rgba(0,0,0,.4);
  --shadow-2: 0 10px 30px rgba(0,0,0,.45);
  --shadow-3: 0 24px 70px rgba(0,0,0,.6);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --display: 'Rubik', system-ui, sans-serif;
  --text:    'Assistant', system-ui, sans-serif;

  --wrap: 1120px;
  --pad: clamp(18px, 4vw, 32px);

  --ease: cubic-bezier(.32,.72,0,1);
  --sw-dir: 1;                 /* switch travel direction (flipped for RTL) */
}
[dir="rtl"] { --sw-dir: -1; }

[data-theme="light"] {
  --bg:       #F6F4EF;
  --bg-2:     #FFFFFF;
  --ink:      #14161B;
  --ink-2:    #4C525C;
  --ink-3:    #5F6570;   /* 4.9:1 — was #767C86 at 3.8:1 */

  --glass:      rgba(255,255,255,.62);
  --glass-2:    rgba(255,255,255,.82);
  --rim:        rgba(10,11,15,.10);
  --rim-strong: rgba(10,11,15,.16);
  --sheen:      rgba(255,255,255,.9);

  --track-off:  rgba(10,11,15,.14);
  --track-rim:  rgba(10,11,15,.10);
  --y-glow:     rgba(232,168,0,.30);
  --y-ink:      #8A5A00;   /* 5.1:1 on the paper background */
  --bad:        #CE2C31;   /* 4.7:1 on paper, 5.2:1 on the white card */
  --lit-1:      #C98A00;
  --lit-2:      #B87A00;   /* 3.3:1 — passes AA for large display text */
  --lit-3:      #8A5A00;
  --track-rim:  rgba(10,11,15,.28);   /* visible outline on the unlit track */

  --shadow-1: 0 1px 2px rgba(20,22,27,.10);
  --shadow-2: 0 10px 30px rgba(20,22,27,.10);
  --shadow-3: 0 24px 60px rgba(20,22,27,.16);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--text);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .4s var(--ease), color .4s var(--ease);
}

/* ambient field — soft yellow bloom + faint circuit grid */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(58vw 42vw at 78% -8%, rgba(255,201,30,.14), transparent 62%),
    radial-gradient(48vw 38vw at 6% 12%, rgba(255,201,30,.07), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg) 55%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .5;
  background-image:
    linear-gradient(var(--rim) 1px, transparent 1px),
    linear-gradient(90deg, var(--rim) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 78%);
}
[data-theme="light"] body::after { opacity: .8; }

h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; line-height: 1.12; letter-spacing: -.015em; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
svg { display: block; }
ul { list-style: none; }

:focus-visible {
  outline: 2px solid var(--y-ink);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { max-width: var(--wrap); margin-inline: auto;
  padding-inline: max(var(--pad), env(safe-area-inset-left)) max(var(--pad), env(safe-area-inset-right)); }

.skip {
  position: absolute; inset-inline-start: -9999px; top: 12px; z-index: 200;
  background: var(--y); color: var(--on-ink); padding: 10px 18px; border-radius: 999px; font-weight: 700;
}
.skip:focus { inset-inline-start: 16px; }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden;
      clip-path: inset(50%); white-space: nowrap; }

/* numbers & phones stay LTR inside RTL text */
.ltr { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }

/* ============================================================
   GLASS PRIMITIVES
   ============================================================ */
.glass {
  background: var(--glass);
  border: 1px solid var(--rim);
  border-radius: var(--r-lg);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  box-shadow: var(--shadow-2), inset 0 1px 0 var(--rim-strong);
}

/* ============================================================
   APPLE-STYLE GLASS SWITCH  (52 × 32, knob 28)
   ============================================================ */
.sw { position: relative; display: inline-flex; align-items: center; flex-shrink: 0; }
.sw input {
  position: absolute; inset: 0; opacity: 0; width: 52px; height: 32px; margin: 0; cursor: pointer; z-index: 1;
}
.sw-track {
  position: relative;
  width: 52px; height: 32px; border-radius: 999px;
  background: var(--track-off);
  border: 1px solid var(--track-rim);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.28), inset 0 -1px 0 var(--rim);
  transition: background .32s var(--ease), border-color .32s var(--ease), box-shadow .32s var(--ease);
}
.sw-track::before {                       /* yellow fill blooms in on check */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, var(--y-hi), var(--y) 42%, var(--y-deep));
  opacity: 0; transform: scale(.86);
  transition: opacity .28s var(--ease), transform .32s var(--ease);
}
.sw-knob {
  position: absolute; inset-block-start: 2px; inset-inline-start: 2px;
  width: 26px; height: 26px; border-radius: 999px;
  background: linear-gradient(180deg, #fff, #EDEEF2);
  box-shadow: 0 2px 5px rgba(0,0,0,.34), 0 0 0 .5px rgba(0,0,0,.06), inset 0 1px 0 var(--sheen);
  transition: transform .34s var(--ease), width .22s var(--ease);
  will-change: transform;
}
.sw input:checked + .sw-track { border-color: transparent; box-shadow: 0 0 0 1px var(--y-deep), 0 6px 18px var(--y-glow); }
.sw input:checked + .sw-track::before { opacity: 1; transform: scale(1); }
/* Brand yellow puts the white knob at only 1.5:1 in light mode. Darken the lit
   track ramp here only — buttons and segment thumbs keep the bright brand fill,
   because there the contrast that matters is dark text on yellow, not knob-on-fill. */
[data-theme="light"] .sw-track::before { background: linear-gradient(180deg, #D69400, #B87A00 42%, #8A5A00); }
.sw input:checked + .sw-track .sw-knob { transform: translateX(calc(20px * var(--sw-dir))); }
.sw input:focus-visible + .sw-track { outline: 2px solid var(--y-ink); outline-offset: 3px; }
/* the iOS press-squish */
.sw input:active + .sw-track .sw-knob { width: 32px; }
.sw input:checked:active + .sw-track .sw-knob { transform: translateX(calc(14px * var(--sw-dir))); }

/* ============================================================
   SEGMENTED GLASS CONTROL
   ============================================================ */
.seg {
  position: relative; display: inline-flex; padding: 4px; gap: 2px;
  background: var(--glass); border: 1px solid var(--rim); border-radius: 999px;
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  box-shadow: inset 0 1px 0 var(--rim-strong), var(--shadow-1);
}
.seg-thumb {
  position: absolute; inset-block: 4px; border-radius: 999px;
  background: linear-gradient(180deg, var(--y-hi), var(--y) 46%, var(--y-deep));
  box-shadow: 0 4px 14px var(--y-glow), inset 0 1px 0 rgba(255,255,255,.6);
  transition: transform .42s var(--ease), width .42s var(--ease);
  pointer-events: none;
}
.seg button {
  position: relative; z-index: 1;
  padding: 9px 20px; border-radius: 999px;
  font-family: var(--display); font-weight: 600; font-size: .95rem;
  color: var(--ink-2); white-space: nowrap;
  transition: color .3s var(--ease);
}
.seg button[aria-selected="true"] { color: var(--on-ink); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: 999px;
  font-family: var(--display); font-weight: 700; font-size: 1rem;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
}
.btn:active { transform: scale(.975); }
.btn svg { width: 19px; height: 19px; }

.btn-y {
  background: linear-gradient(180deg, var(--y-hi), var(--y) 45%, var(--y-deep));
  color: var(--on-ink);
  box-shadow: 0 8px 24px var(--y-glow), inset 0 1px 0 rgba(255,255,255,.55);
}
.btn-y:hover { box-shadow: 0 12px 34px var(--y-glow), inset 0 1px 0 rgba(255,255,255,.65); }

.btn-glass {
  background: var(--glass-2); border: 1px solid var(--rim-strong); color: var(--ink);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-1), inset 0 1px 0 var(--rim-strong);
}
.btn-glass:hover { background: var(--glass); border-color: var(--y-ink); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s;
}
.nav.stuck {
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom-color: var(--rim);
}
.nav .wrap { display: flex; align-items: center; gap: 18px; height: 72px; }

.brand { display: flex; align-items: center; gap: 11px; margin-inline-end: auto; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
  background: linear-gradient(155deg, var(--y-hi), var(--y) 45%, var(--y-deep));
  display: grid; place-items: center;
  box-shadow: 0 6px 20px var(--y-glow), inset 0 1px 0 rgba(255,255,255,.6);
}
.brand-mark svg { width: 21px; height: 21px; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 1.08rem; letter-spacing: -.02em; line-height: 1.15; }
.brand-sub { font-size: .78rem; color: var(--ink-3); font-weight: 500; letter-spacing: .02em; }

.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: 999px; font-size: .95rem; font-weight: 600; color: var(--ink-2);
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--glass); }

.theme-sw { display: flex; align-items: center; gap: 6px; }
.theme-sw .ico { width: 15px; height: 15px; color: var(--ink-3); transition: color .3s; }
/* utility control — dial it back so it doesn't compete with the call CTA */
.theme-sw .sw { transform: scale(.78); transform-origin: center; margin-inline: -5px; }

@media (max-width: 900px) { .nav-links, .nav .btn-nav { display: none; } }
/* ============================================================
   SECTIONS
   ============================================================ */
/* one rhythm: the hero owns the top padding, every section owns its bottom gap */
section { padding-block: 0 clamp(56px, 8vw, 104px); }
section[id], #main { scroll-margin-top: 88px; }   /* clear the sticky nav */
.head { max-width: 66ch; margin-bottom: clamp(30px, 4vw, 46px); }
.head .kicker {
  display: block; font-family: var(--display); font-weight: 700; font-size: .82rem;
  letter-spacing: .13em; color: var(--y-ink); margin-bottom: 12px;
}
.head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
.head p { margin-top: 14px; color: var(--ink-2); font-size: 1.06rem; }

.head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(28px, 4vw, 44px); }
.head-row .head { margin-bottom: 0; flex: 1 1 420px; }
/* ---------- faq ---------- */
.faq { display: grid; gap: 10px; max-width: 820px; }
.qa { overflow: hidden; }
.qa summary {
  list-style: none; cursor: pointer; padding: 20px 24px;
  display: flex; align-items: center; gap: 16px;
  font-family: var(--display); font-weight: 600; font-size: 1.05rem;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary .plus {
  margin-inline-start: auto; flex-shrink: 0; width: 26px; height: 26px; border-radius: 999px;
  background: var(--glass-2); border: 1px solid var(--rim); display: grid; place-items: center;
  transition: transform .35s var(--ease), background .3s;
}
.qa summary .plus svg { width: 13px; height: 13px; color: var(--ink-2); }
.qa[open] summary .plus { transform: rotate(45deg); background: var(--y); }
.qa[open] summary .plus svg { color: var(--on-ink); }
.qa .a { padding: 0 24px 22px; color: var(--ink-2); font-size: 1rem; }

/* ---------- footer ---------- */
footer.site {
  border-top: 1px solid var(--rim); padding: 34px 0 calc(34px + env(safe-area-inset-bottom));
  margin-bottom: 74px;
}
@media (min-width: 901px) { footer.site { margin-bottom: 0; } }
footer.site .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; justify-content: space-between; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { font-size: .92rem; color: var(--ink-3); font-weight: 600; transition: color .2s; }
.foot-links a:hover { color: var(--y-ink); }
.copy { font-size: .86rem; color: var(--ink-3); }

/* ---------- sticky mobile action bar ---------- */
.dock {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 90;
  padding: 10px max(var(--pad), env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(var(--pad), env(safe-area-inset-left));
  display: grid; grid-template-columns: 1fr 1fr; gap: 9px;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--rim);
}
.dock .btn { padding: 13px 16px; font-size: .97rem; }
/* must match the .btn-nav breakpoint, or 721–900px gets no call CTA at all */
@media (min-width: 901px) { .dock { display: none; } }

/* ---------- scroll reveal ---------- */
.rise { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.rise.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .rise { opacity: 1; transform: none; transition: none; } }

/* ============================================================
   /shealot/ — Q&A hub and article pages
   ============================================================ */
main.sub { padding-bottom: clamp(56px, 8vw, 104px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .9rem; color: var(--ink-3); font-weight: 600; margin: clamp(22px, 3vw, 34px) 0 18px; }
.crumbs a { color: var(--ink-2); }
.crumbs a:hover { color: var(--y-ink); }

.page-head { max-width: 760px; margin-bottom: clamp(26px, 4vw, 40px); }
.page-head .kicker { display: block; font-family: var(--display); font-weight: 700; font-size: .82rem; letter-spacing: .13em; color: var(--y-ink); margin-bottom: 12px; }
.page-head h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 900; letter-spacing: -.03em; }
.page-head .lead { margin-top: 16px; font-size: clamp(1.05rem, 2vw, 1.18rem); color: var(--ink-2); }
.byline { margin-top: 16px; display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--ink-3); font-weight: 600; }
.byline .dot { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--y); color: var(--on-ink); flex-shrink: 0; }
.byline .dot svg { width: 15px; height: 15px; }

/* article body */
.art { max-width: 760px; }
.art h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); margin: clamp(34px, 5vw, 48px) 0 14px; }
.art p { color: var(--ink-2); font-size: 1.06rem; margin-bottom: 14px; }
.art p b, .art li b { color: var(--ink); }
.art ol, .art ul.dots { display: grid; gap: 10px; margin: 6px 0 16px; }
.art ol { counter-reset: st; list-style: none; }
.art ol li { counter-increment: st; position: relative; padding-inline-start: 46px; color: var(--ink-2); font-size: 1.04rem; min-height: 32px; padding-top: 3px; }
.art ol li::before {
  content: counter(st); position: absolute; inset-inline-start: 0; top: 0;
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: .95rem;
  background: linear-gradient(180deg, var(--y-hi), var(--y) 45%, var(--y-deep)); color: var(--on-ink);
}
.art ul.dots li { position: relative; padding-inline-start: 22px; color: var(--ink-2); font-size: 1.04rem; }
.art ul.dots li::before { content: ""; position: absolute; inset-inline-start: 4px; top: .62em; width: 8px; height: 8px; border-radius: 99px; background: var(--y-ink); }

.note { padding: 18px 22px; margin: 18px 0 8px; border-inline-start: 4px solid var(--y-ink); }
.note p { margin: 0; color: var(--ink); }
.note.alert { border-inline-start-color: var(--bad); }
.note.alert strong { color: var(--bad); }

.shot { margin: 22px 0 10px; overflow: hidden; max-width: 560px; }
.shot img { width: 100%; height: auto; display: block; }
.shot figcaption { padding: 12px 18px 14px; font-size: .92rem; color: var(--ink-3); }

.art-cta { margin-top: clamp(38px, 5vw, 56px); padding: clamp(24px, 4vw, 38px); text-align: center; }
.art-cta h2 { margin: 0; font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
.art-cta p { margin: 10px auto 0; max-width: 46ch; }
.art-cta .row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }

.more-q { margin-top: clamp(44px, 6vw, 64px); max-width: 760px; }
.more-q h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); margin-bottom: 14px; }

/* hub: article cards */
.q-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.q-card { display: block; padding: 24px 24px 26px; transition: transform .35s var(--ease), border-color .35s var(--ease); }
.q-card:hover { transform: translateY(-3px); border-color: var(--y-ink); }
.q-card .tag { font-size: .8rem; font-weight: 700; letter-spacing: .08em; color: var(--y-ink); }
.q-card h2 { font-size: 1.22rem; margin: 8px 0; }
.q-card p { color: var(--ink-2); font-size: .98rem; }
.q-card .go { margin-top: 14px; display: inline-flex; gap: 6px; align-items: center; font-family: var(--display); font-weight: 700; color: var(--y-ink); font-size: .95rem; }
.hub-faq { margin-top: clamp(44px, 6vw, 64px); }
.hub-faq h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); margin-bottom: 18px; }
