/* ============================================================
   HyperFrames — עיצוב מדריך זה בלבד.
   כל סלקטור כאן מתחיל ב-.guide-hyperframes כדי שהעיצוב לא ידלוף
   לשאר האתר. אל תשתמשו בקובץ הזה מחוץ לדף הזה.

   פלטה: light-violet, זהה לפלטה הגלובלית ב-../styles.css. --accent עובר גם
   בטקסט לבן על מילוי מלא (6.23:1) אז --accent-deep שווה לאותו ערך בכוונה.
   --accent-hover הוא ההכהיה למצבי hover על מילוי accent מלא.
   בלוקי הקוד נשארים כהים דרך --code-bg/--code-text גם על עמוד בהיר -
   זה מכוון, לא נשכח מה-re-skin: על עמוד שקט הם העוגן החזותי הכי חזק.
   ============================================================ */

.guide-hyperframes{
  --bg:#FEFEFE;
  --surface:#FFFFFF;
  --surface-sunk:#F7F6FC;
  --ink:#181A1E;
  --ink-muted:#4A4D5A;
  --accent:#751FFD;
  --accent-deep:#751FFD;
  --accent-hover:#6417E0;
  --accent-rgb:117,31,253;
  --accent-dim:rgba(117,31,253,0.14);
  --on-accent:#FFFFFF;
  --border:#E8E6F2;
  --border-strong:#D5D2E6;
  --code-bg:#181A1E;
  --code-text:#E8EEF2;
  --code-text-muted:#A8B0BE;
  --code-surface:#23262D;
  --code-border:rgba(232,238,242,0.16);
  --danger:#E23B3B;
  --danger-rgb:226,59,59;
  --success:#10B981;
  --success-rgb:16,185,129;

  --font-en:'Space Grotesk', 'Space Grotesk Fallback', sans-serif;
  --font-he:'Rubik', 'Rubik Fallback', 'Space Grotesk', 'Space Grotesk Fallback', sans-serif;
  --font-mono:'JetBrains Mono', 'JetBrains Mono Fallback', monospace;

  --radius:14px;
  --radius-sm:8px;
  --max-w:980px;

  display:block;
  position:relative;
  direction:rtl;
  color:var(--ink);
  font-family:var(--font-he);
  font-weight:400;
  line-height:1.65;
  font-size:1rem;
  -webkit-font-smoothing:antialiased;
  max-width:100%;
  overflow-x:clip;
}

/* This block redeclares the site's color tokens (see the comment at the
   top of this file) so it takes precedence over html.hc by proximity in
   the custom-property inheritance chain, not by selector specificity -
   html.hc's own override never reaches anything inside .guide-hyperframes
   unless it's restated here too. Values mirror html.hc in ../styles.css. */
html.hc .guide-hyperframes{
  --bg:#FFFFFF;
  --surface:#FFFFFF;
  --surface-sunk:#FFFFFF;
  --ink:#000000;
  --ink-muted:#000000;
  --accent:#4C00C7;
  --accent-deep:#4C00C7;
  --on-accent:#FFFFFF;
  --border:#000000;
  --border-strong:#000000;
}

.guide-hyperframes h1,
.guide-hyperframes h2,
.guide-hyperframes h3,
.guide-hyperframes p,
.guide-hyperframes ul,
.guide-hyperframes ol,
.guide-hyperframes figure{ margin:0; }
.guide-hyperframes ul,
.guide-hyperframes ol{ padding:0; list-style:none; }
.guide-hyperframes p,
.guide-hyperframes li,
.guide-hyperframes h1,
.guide-hyperframes h2,
.guide-hyperframes h3{ overflow-wrap:anywhere; }
.guide-hyperframes img,
.guide-hyperframes svg,
.guide-hyperframes video,
.guide-hyperframes canvas{ display:block; max-width:100%; height:auto; }
.guide-hyperframes button{ font:inherit; color:inherit; background:none; border:none; cursor:pointer; }
.guide-hyperframes a{ color:inherit; }

/* ---------- Focus ---------- */
.guide-hyperframes a:focus-visible,
.guide-hyperframes button:focus-visible,
.guide-hyperframes [tabindex]:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
  border-radius:4px;
}

/* ---------- Latin / numerals / labels ---------- */
.guide-hyperframes .en{
  font-family:var(--font-en);
}

/* ---------- Layout helpers ---------- */
.guide-hyperframes .wrap{
  max-width:var(--max-w);
  margin:0 auto;
  padding-inline:20px;
}
.guide-hyperframes{ z-index:1; }
.guide-hyperframes section{
  position:relative;
  z-index:1;
  padding-block:56px;
}

.guide-hyperframes h2{
  font-family:var(--font-he);
  font-weight:700;
  font-size:clamp(1.5rem, 4vw, 2.125rem);
  margin-bottom:18px;
  letter-spacing:0;
  color:var(--ink);
}

/* ---------- Progress bar ---------- */
.guide-hyperframes .progress-bar{
  position:fixed;
  top:0;
  inset-inline-start:0;
  inset-inline-end:0;
  height:3px;
  width:0%;
  background:var(--accent);
  transition:width 0.1s linear;
  z-index:150;
}
@media (prefers-reduced-motion: reduce){
  .guide-hyperframes .progress-bar{ transition:none; }
}


/* ---------- Hero ---------- */
.guide-hyperframes .hero{
  padding-block:64px 48px;
  text-align:center;
}
.guide-hyperframes .hero h1{
  font-family:var(--font-he);
  font-weight:700;
  font-size:clamp(1.75rem, 5.5vw, 2.875rem);
  line-height:1.25;
  max-width:780px;
  margin:0 auto 20px;
  letter-spacing:0;
  color:var(--ink);
}
.guide-hyperframes .hero-sub{
  color:var(--ink-muted);
  font-size:clamp(1rem, 2.2vw, 1.1875rem);
  max-width:640px;
  margin:0 auto 14px;
}
.guide-hyperframes .hero-sub:last-of-type{ margin-bottom:0; }

/* ---------- Buttons (inline CTA, e.g. the ch.3 install-guide link) ---------- */
.guide-hyperframes .hero-actions{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  margin-block:16px 4px;
}
.guide-hyperframes .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:48px;
  padding:12px 26px;
  border-radius:999px;
  font-weight:700;
  font-size:0.9375rem;
  text-decoration:none;
  transition:transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  border:1px solid transparent;
}
.guide-hyperframes .btn:hover{ transform:translateY(-1px); }
html.link-emphasis .guide-hyperframes .btn{
  text-decoration:underline;text-underline-offset:3px;
}
@media (prefers-reduced-motion: reduce){ .guide-hyperframes .btn{ transition:none; } .guide-hyperframes .btn:hover{ transform:none; } }
.guide-hyperframes .btn-primary{
  background:var(--accent);
  color:var(--on-accent);
}
.guide-hyperframes .btn-primary:hover{
  background:var(--accent-hover);
  box-shadow:0 6px 24px rgba(var(--accent-rgb), 0.28);
}

/* ---------- Body text ---------- */
.guide-hyperframes p.body-text{
  color:var(--ink-muted);
  font-size:0.9375rem;
  max-width:68ch;
  margin-bottom:14px;
}
.guide-hyperframes p.body-text strong{ color:var(--ink); font-weight:700; }
.guide-hyperframes section > p.body-text:last-child{ margin-bottom:0; }

/* ---------- Plain bullet lists ---------- */
.guide-hyperframes .plain-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-block:14px;
}
.guide-hyperframes .plain-list li{
  position:relative;
  padding-inline-start:16px;
  font-size:0.90625rem;
  color:var(--ink-muted);
}
.guide-hyperframes .plain-list li::before{
  content:'';
  position:absolute;
  inset-inline-start:0;
  top:8px;
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--accent);
}

/* ---------- "10 minutes" box: highlighted, sits before the TOC ----------
   Reuses two already-established patterns instead of inventing a new one:
   the accent-tinted surface from .cost-box.accent, and the numbered-step
   list shape from .verify-list — composed together since neither alone
   matches this content (a highlighted box wrapping a numbered list). */
.guide-hyperframes .ten-min-box{
  background:var(--accent-dim);
  border:1px solid rgba(var(--accent-rgb), 0.3);
  border-radius:var(--radius);
  padding:24px;
}
.guide-hyperframes .ten-min-box h2{ margin-bottom:10px; }
.guide-hyperframes .ten-min-box .body-text{ color:var(--ink); }
.guide-hyperframes .ten-min-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-block:16px;
}
.guide-hyperframes .ten-min-list li{
  font-size:0.9375rem;
  color:var(--ink);
}

/* ---------- Code blocks (stay dark on purpose - see DESIGN.md) ---------- */
.guide-hyperframes .code-block{
  position:relative;
  max-width:100%;
  background:var(--code-bg);
  border:1px solid var(--border-strong);
  border-radius:var(--radius-sm);
  margin-block:12px;
  overflow:hidden;
}
.guide-hyperframes .code-block pre{
  direction:ltr;
  text-align:start;
  font-family:var(--font-mono);
  font-size:0.84375rem;
  color:var(--code-text);
  margin:0;
  padding:60px 16px 16px 16px;
  max-width:100%;
  overflow-x:auto;
  white-space:pre;
  line-height:1.6;
}
.guide-hyperframes .code-block code{
  display:inline-block;
  min-width:max-content;
}
.guide-hyperframes .code-block::after{
  content:'';
  position:absolute;
  inset-inline-start:0;
  top:60px;
  bottom:0;
  width:20px;
  background:linear-gradient(to left, var(--code-bg), transparent);
  pointer-events:none;
}

/* RTL prompt blocks (ch.6, ch.16): Hebrew example prompts, read right-to-left.
   Same container/token as .code-block, direction and copy-button side
   mirrored instead of a new component. */
.guide-hyperframes .code-block.rtl-prompt pre{
  direction:rtl;
  text-align:start;
  white-space:pre-wrap;
}
.guide-hyperframes .code-block.rtl-prompt::after{
  /* wrapped text never overflows horizontally, so the LTR blocks' edge-fade
     (which signals more content off-screen) doesn't apply here */
  display:none;
}
.guide-hyperframes .code-block.rtl-prompt .copy-btn{
  inset-inline-start:auto;
  inset-inline-end:8px;
}
.guide-hyperframes .code-block.rtl-prompt pre{
  overflow-x:hidden;
}
.guide-hyperframes .code-block.rtl-prompt code{
  min-width:0;
  display:block;
}

.guide-hyperframes .copy-btn{
  position:absolute;
  top:8px;
  inset-inline-start:8px;
  display:flex;
  align-items:center;
  gap:6px;
  min-width:44px;
  min-height:44px;
  padding:6px 14px;
  background:var(--code-surface);
  border:1px solid var(--code-border);
  border-radius:999px;
  font-family:var(--font-en);
  font-size:0.75rem;
  font-weight:600;
  color:var(--code-text);
  direction:ltr;
  transition:border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.guide-hyperframes .copy-btn:hover{ border-color:var(--accent); }
.guide-hyperframes .copy-btn.is-copied{
  background:var(--accent);
  color:var(--on-accent);
  border-color:var(--accent);
}
.guide-hyperframes .copy-btn svg{ width:14px; height:14px; flex-shrink:0; }
@media (prefers-reduced-motion: reduce){ .guide-hyperframes .copy-btn{ transition:none; } }

.guide-hyperframes .inline-code{
  font-family:var(--font-mono);
  font-size:0.88em;
  background:var(--surface-sunk);
  border:1px solid var(--border);
  border-radius:4px;
  padding:1px 6px;
  direction:ltr;
  unicode-bidi:embed;
  display:inline-block;
  color:var(--ink);
}

/* ---------- Windows/macOS example pair (ch.3) ---------- */
.guide-hyperframes .os-pair{
  display:grid;
  grid-template-columns:1fr;
  gap:14px;
  margin-block:14px;
  min-width:0;
}
@media (min-width: 640px) {
  .guide-hyperframes .os-pair{ grid-template-columns:1fr 1fr; }
}
.guide-hyperframes .os-pair .os-block{ min-width:0; }
.guide-hyperframes .os-pair .os-block .os-label{
  font-size:0.78125rem;
  font-weight:700;
  color:var(--ink-muted);
  margin-bottom:4px;
  display:block;
}

/* ---------- Final checklist (ch.17) ---------- */
.guide-hyperframes .checklist{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:14px;
}
.guide-hyperframes .checklist-item{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:14px;
  width:100%;
  max-width:100%;
  min-height:56px;
  padding:14px 18px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  text-align:start;
  transition:border-color 0.15s ease, background 0.15s ease;
}
.guide-hyperframes .checklist-item:hover{ border-color:var(--border-strong); }
@media (prefers-reduced-motion: reduce){ .guide-hyperframes .checklist-item{ transition:none; } }

.guide-hyperframes .checklist-item .box{
  flex-shrink:0;
  width:24px;
  height:24px;
  border-radius:6px;
  border:2px solid var(--ink-muted);
  display:flex;
  align-items:center;
  justify-content:center;
  transition:border-color 0.15s ease, background 0.15s ease;
}
.guide-hyperframes .checklist-item .box svg{
  opacity:0;
  transition:opacity 0.15s ease;
  width:14px;
  height:14px;
  color:var(--on-accent);
}
.guide-hyperframes .checklist-item[aria-pressed="true"]{
  border-color:var(--accent);
  background:var(--accent-dim);
}
.guide-hyperframes .checklist-item[aria-pressed="true"] .box{
  border-color:var(--accent);
  background:var(--accent);
}
.guide-hyperframes .checklist-item[aria-pressed="true"] .box svg{ opacity:1; }
.guide-hyperframes .checklist-item[aria-pressed="true"] .label{
  color:var(--ink-muted);
  text-decoration:line-through;
  text-decoration-color:var(--ink-muted);
}
.guide-hyperframes .checklist-item .label{ font-size:0.9375rem; flex:1; min-width:0; overflow-wrap:anywhere; color:var(--ink); }

.guide-hyperframes .checklist-progress{
  font-size:0.84375rem;
  color:var(--ink-muted);
  margin-bottom:16px;
}
.guide-hyperframes .checklist-progress .num{ color:var(--accent-deep); font-weight:600; }

/* ---------- Reveal on scroll ---------- */
.guide-hyperframes .reveal{
  opacity:0;
  transform:translateY(16px);
  transition:opacity 0.5s ease, transform 0.5s ease;
}
.guide-hyperframes .reveal.is-visible{
  opacity:1;
  transform:translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .guide-hyperframes .reveal{ opacity:1; transform:none; transition:none; }
}

/* ---------- aria-live copy status ---------- */
.guide-hyperframes .visually-hidden{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0, 0, 0, 0);
  white-space:nowrap;
  border:0;
}
