/* Guide pages: long-form, one column, images full width, prompts as quiet boxes */
:root { --col: 680px; --hebrew: "Heebo", "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; }
html[lang="he"] body { font-family: var(--hebrew); font-feature-settings: normal; }
html[lang="he"] .hero-copy h1, html[lang="he"] .guide-title h1 { letter-spacing: 0; }

.guide-top { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 26px clamp(20px, 4vw, 44px); font-size: 14px; }
.guide-top .name { font-weight: 600; }
.guide-top nav { display: flex; gap: 22px; align-items: center; }
.lang { border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: 13px; }
.lang:hover { border-color: var(--ink); text-decoration: none; }

.guide-title { padding: clamp(28px, 6vh, 64px) 0 28px; }
.guide-title .kicker { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin: 0 0 16px; }
.guide-title h1 { margin: 0 0 16px; font-size: clamp(32px, 5vw, 48px); line-height: 1.1; font-weight: 600; letter-spacing: -0.025em; text-wrap: balance; }
.guide-title .dek { margin: 0 0 24px; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; color: var(--muted); max-width: 56ch; text-wrap: pretty; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; font-weight: 500; font-size: 15px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.btn:hover { text-decoration: none; border-color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.is-disabled { opacity: 0.55; cursor: default; }

/* 3D hero in the guide */
.stage { position: relative; width: min(1120px, calc(100% - 32px)); margin: 8px auto 0; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: linear-gradient(var(--sky-top), var(--sky-hor)); isolation: isolate; box-shadow: 0 30px 80px -30px rgba(0,0,0,0.35); }
@media (max-width: 700px) { .stage { aspect-ratio: 4 / 5; width: calc(100% - 24px); border-radius: 12px; } }
.stage .hero-canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; transition: opacity 1.4s ease; cursor: grab; }
.stage.is-ready .hero-canvas { opacity: 1; }
.stage.is-dragging .hero-canvas { cursor: grabbing; }
.stage .hero-poster { position: absolute; inset: 0; pointer-events: none; background: url("/assets/img/poster-framed.jpg") center / cover no-repeat; transition: opacity 1.6s ease; }
.stage.is-ready .hero-poster { opacity: 0; }
.stage .hero-bottom { position: absolute; inset: auto 0 0 0; height: 40%; pointer-events: none; background: linear-gradient(to top, rgba(8,10,16,0.66), rgba(8,10,16,0)); }
.stage .stage-caption { position: absolute; inset: auto 0 0 0; z-index: 2; padding: 18px 22px; color: #f4f1ea; font-size: 13.5px; line-height: 1.45; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; pointer-events: none; }
.stage .stage-caption b { font-weight: 600; }
.stage .stage-caption .light { font-family: var(--mono); font-size: 12px; white-space: nowrap; opacity: 0.9; }
.stage .stage-caption .light .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff5f7e; margin-inline-end: 7px; animation: pulse 2.4s ease-in-out infinite; }
@media (max-width: 700px) { .stage .stage-caption { flex-direction: column; align-items: flex-start; } .stage .stage-caption .light { white-space: normal; } }
.stage-note { width: min(var(--col), calc(100% - 48px)); text-align: center; font-size: 13px; line-height: 1.5; color: var(--muted); margin: 12px auto 0; }

/* article */
article { padding: 48px 0 40px; }
article h2 { font-size: clamp(24px, 3vw, 30px); line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; margin: 64px 0 18px; scroll-margin-top: 24px; }
article h2 .num, article h3 .num { display: inline-block; font-family: var(--mono); font-weight: 400; font-size: 14px; color: var(--muted); margin-inline-end: 12px; vertical-align: 0.35em; letter-spacing: 0.02em; }
article h3 { font-size: 18px; margin: 32px 0 10px; font-weight: 600; }
article p { font-size: 17.5px; line-height: 1.65; margin: 0 0 16px; text-wrap: pretty; }
article ul.plain { padding-inline-start: 1.2em; margin: 0 0 16px; }
article ul.plain li { margin: 0 0 6px; font-size: 17px; line-height: 1.55; }
article code { font-family: var(--mono); font-size: 0.86em; background: color-mix(in srgb, var(--ink) 7%, transparent); padding: 0.1em 0.4em; border-radius: 5px; direction: ltr; unicode-bidi: embed; }
.toc { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px 24px; font-size: 15px; }
.toc a { color: var(--muted); }
.toc a:hover { color: var(--accent); text-decoration: none; }
.toc .n { font-family: var(--mono); font-size: 12px; margin-inline-end: 8px; }

.callout { border-inline-start: 2px solid var(--accent); padding: 4px 0 4px 20px; margin: 28px 0; }
html[lang="he"] .callout { padding: 4px 20px 4px 0; }
.callout p { margin: 0; font-size: 19px; line-height: 1.55; }
.callout .label { display: block; font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 8px; }

.lesson { margin: 20px 0 0; padding: 14px 18px; border-radius: 10px; background: color-mix(in srgb, var(--ink) 5%, transparent); font-size: 16px; line-height: 1.5; }
.lesson b { font-weight: 600; margin-inline-end: 6px; }

/* pipeline */
.pipeline { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 28px 0 8px; width: min(1000px, calc(100% - 32px)); margin-inline: auto; }
.pipeline .node { border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px 12px; position: relative; background: color-mix(in srgb, var(--bg) 70%, transparent); }
.pipeline .node .k { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.pipeline .node .t { font-weight: 600; font-size: 15px; margin-bottom: 4px; line-height: 1.3; }
.pipeline .node .d { font-size: 13.5px; color: var(--muted); line-height: 1.4; }
@media (max-width: 800px) { .pipeline { grid-template-columns: 1fr 1fr; } .pipeline .node:last-child { grid-column: 1 / -1; } }
@media (max-width: 480px) { .pipeline { grid-template-columns: 1fr; } }

/* figures */
figure { margin: 22px 0; }
figure img { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); background: #dfe9f0; cursor: zoom-in; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; line-height: 1.45; }
.figs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 22px 0; }
.figs figure { margin: 0; }
.figs img { aspect-ratio: 4 / 3; object-fit: cover; }
.figs img.contain { object-fit: contain; background: #1c2128; }
.figs.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 600px) { .figs, .figs.three { grid-template-columns: 1fr; } }
.wide { width: min(1000px, calc(100% - 32px)); margin-inline: auto; }

/* before / after */
.ba { position: relative; overflow: hidden; border-radius: 10px; border: 1px solid var(--line); aspect-ratio: 881 / 866; user-select: none; touch-action: pan-y; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; border-radius: 0; cursor: ew-resize; }
.ba .after { clip-path: inset(0 0 0 var(--cut, 50%)); }
.ba .handle { position: absolute; top: 0; bottom: 0; left: var(--cut, 50%); width: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.25); pointer-events: none; }
.ba .handle::after { content: "\2194"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 36px; height: 36px; border-radius: 50%; background: #fff; color: #17181d; display: grid; place-items: center; font-size: 16px; box-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.ba .tag { position: absolute; top: 10px; padding: 4px 8px; border-radius: 6px; background: rgba(8,10,16,0.6); color: #fff; font-size: 12px; font-family: var(--mono); pointer-events: none; }
.ba .tag.l { left: 10px; } .ba .tag.r { right: 10px; }
.ba input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; cursor: ew-resize; }

/* prompts */
.prompt { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px 16px; margin: 18px 0; background: color-mix(in srgb, var(--ink) 3%, transparent); }
.prompt .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.prompt .head .t { font-weight: 600; font-size: 16px; }
.prompt .head .n { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.prompt .when { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.prompt pre { margin: 0; white-space: pre-wrap; font-family: var(--mono); font-size: 13.5px; line-height: 1.55; direction: ltr; text-align: left; unicode-bidi: embed; color: var(--ink); }
.prompt .copy { margin-top: 12px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; border: 1px solid var(--line); background: transparent; color: var(--ink); border-radius: 8px; padding: 6px 11px; cursor: pointer; font-family: inherit; }
.prompt .copy:hover { border-color: var(--ink); }
.prompt .copy.copied { border-color: var(--accent); color: var(--accent); }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; width: min(1000px, calc(100% - 32px)); margin: 24px auto; }
.gallery figure { margin: 0; }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; }
.gallery figcaption { font-size: 13px; }
@media (max-width: 800px) { .gallery { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .gallery { grid-template-columns: 1fr; } }
.sub { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin: 32px 0 0; text-align: center; }

/* lightbox */
dialog.lb { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; }
dialog.lb::backdrop { background: rgba(8,10,16,0.88); }
dialog.lb img { max-width: 96vw; max-height: 88vh; display: block; border-radius: 8px; }
dialog.lb figcaption { color: #f4f1ea; text-align: center; padding: 10px 0 0; }

/* closing */
.cta { margin: 72px 0 0; padding: 32px 0; border-top: 1px solid var(--line); }
.cta h2 { margin-top: 0; }
.guide-footer { padding: 40px 0 64px; color: var(--muted); font-size: 14px; }
.guide-footer .links { display: flex; gap: 22px; margin-bottom: 14px; }
.guide-footer .links a { color: var(--ink); font-weight: 500; }
.guide-footer .links a:hover { color: var(--accent); text-decoration: none; }

@keyframes pulse { 50% { opacity: 0.35; } }

/* lighting toggle on the stage */
.stage-light { position: absolute; top: 14px; right: 14px; z-index: 3; display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(8,10,16,0.55); backdrop-filter: blur(6px); }
.stage-light button { border: 0; background: transparent; color: #f4f1ea; font: 500 12.5px/1 var(--sans); padding: 7px 11px; border-radius: 999px; cursor: pointer; opacity: 0.75; }
.stage-light button.on { background: #f4f1ea; color: #17181d; opacity: 1; }
html[lang="he"] .stage-light { right: auto; left: 14px; }

/* status line instead of a dead button */
.status { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; border: 1px dashed var(--line); color: var(--muted); font-size: 14px; }
.status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

/* milestone list, checks, problems */
ol.steps { counter-reset: s; list-style: none; margin: 0 0 16px; padding: 0; }
ol.steps li { position: relative; padding: 0 0 18px 44px; counter-increment: s; font-size: 17px; line-height: 1.55; }
html[lang="he"] ol.steps li { padding: 0 44px 18px 0; }
ol.steps li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: 3px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
html[lang="he"] ol.steps li::before { left: auto; right: 0; }
ol.steps li b { display: block; font-weight: 600; margin-bottom: 2px; }
ol.steps li .out { display: block; font-size: 14.5px; color: var(--muted); margin-top: 4px; }
.box { border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin: 22px 0; }
.box h4 { margin: 0 0 10px; font-size: 13px; font-family: var(--mono); font-weight: 400; letter-spacing: 0.04em; color: var(--muted); }
.box ul.plain li { font-size: 16px; }
.problems { display: grid; gap: 14px; margin: 22px 0; }
.problem { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; font-size: 15px; line-height: 1.5; }
.problem b { display: block; font-weight: 600; margin-bottom: 6px; font-size: 16px; }
.problem span { display: block; }
.problem span i { font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-inline-end: 8px; }
.pseudo { margin: 16px 0; padding: 14px 16px; border-radius: 10px; background: color-mix(in srgb, var(--ink) 5%, transparent); font-family: var(--mono); font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; direction: ltr; text-align: left; }
details.eng { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; margin: 18px 0; }
details.eng summary { cursor: pointer; font-weight: 600; font-size: 16px; }
details.eng[open] summary { margin-bottom: 8px; }
.tag { display: inline-block; font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 6px; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--muted); margin-inline-end: 6px; vertical-align: 1px; }
.tag.play { background: color-mix(in srgb, #2aa36b 22%, transparent); color: inherit; }
.tag.wip { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; }
.loop { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 18px 0; }
.loop div { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; line-height: 1.35; position: relative; }
.loop div b { display: block; font-family: var(--mono); font-size: 11px; color: var(--muted); font-weight: 400; margin-bottom: 4px; }
.kickoff pre { max-height: none; }

.tldr { margin: 0 0 22px; padding: 16px 18px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 9%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); font-size: 16px; line-height: 1.55; max-width: 62ch; }
.tldr b { font-weight: 600; margin-inline-end: 6px; }
ol.timeline-log li b { font-size: 17px; }

.credits-line { font-size: 14px; color: var(--muted); margin-top: 40px; }

.figs.phones img { aspect-ratio: 9 / 16; object-fit: cover; object-position: center 40%; }
.figs.phones { max-width: 560px; margin-inline: auto; }

/* tutorial steps: a proper step marker on h2, and a 3-column loop grid so six cards make two even rows */
article h2 .num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-family: var(--mono); font-size: 15px; font-weight: 500; margin-inline-end: 14px; vertical-align: 0.12em; }
.loop { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .loop { grid-template-columns: repeat(2, 1fr); } .figs.phones { grid-template-columns: 1fr 1fr; } }
