/* Vandly guide — same tokens as the Vandly page (vandly-preview.css) */
:root {
  --bg: #060d1c;
  --surface: #0d1830;
  --surface-2: #122040;
  --blue: #1a6bff;
  --blue-deep: #0d47c9;
  --teal: #00d4c8;
  --teal-soft: #5eead4;
  --orange: #ff8a1f;
  --ink: #eef4ff;
  --ink-muted: #8fa0c0;
  --border: rgba(0, 212, 200, 0.18);
  --glow: 0 0 26px rgba(0, 212, 200, 0.35);
  --radius: 20px;
  --header-offset: 8.6rem;
}

body.is-live { --header-offset: 6.8rem; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-offset); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans Arabic", "Tajawal", sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  font-family: "Tajawal", sans-serif;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 0.4em;
}
a { color: var(--teal-soft); }
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.circuit-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(0, 212, 200, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 107, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 35%, transparent 100%);
}
.nodes-layer { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.node {
  position: absolute;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 12px 3px rgba(0, 212, 200, 0.4);
  opacity: 0.35;
  animation: nodeFloat var(--dur, 14s) ease-in-out infinite alternate, nodePulse 3s ease-in-out infinite;
}
@keyframes nodeFloat {
  from { transform: translate(0, 0); }
  to { transform: translate(var(--dx, 20px), var(--dy, -30px)); }
}
@keyframes nodePulse {
  0%, 100% { opacity: 0.18; }
  50% { opacity: 0.5; }
}

.progress {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: 3px;
  z-index: 100;
  background: transparent;
  pointer-events: none;
}
.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--teal-soft), var(--teal) 40%, var(--blue));
  box-shadow: 0 0 12px rgba(0, 212, 200, 0.7);
}

.top-stack {
  position: sticky;
  top: 0;
  z-index: 80;
}
.preview-bar {
  background: rgba(18, 12, 6, 0.94);
  border-bottom: 1px solid rgba(255, 138, 31, 0.35);
  color: #ffd7b0;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0.42rem 1rem;
}
.site-header {
  background: rgba(6, 13, 28, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(0, 212, 200, 0.12);
}
.container { width: min(1180px, calc(100% - 1.5rem)); margin-inline: auto; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding-block: 0.62rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  text-decoration: none;
  font-family: "Tajawal", sans-serif;
  font-weight: 900;
  font-size: 1.15rem;
}
.brand img { width: 42px; height: 42px; object-fit: contain; }
.main-nav { display: none; gap: 1.15rem; }
.main-nav a { color: var(--ink-muted); text-decoration: none; font-weight: 600; }
.main-nav a:hover { color: var(--teal-soft); }
.header-tools { display: flex; align-items: center; gap: 0.45rem; }

.lang-switch { position: relative; }
.lang-btn, .icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--teal-soft);
  font-family: "Space Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.lang-btn:hover, .icon-btn:hover { border-color: var(--teal); box-shadow: var(--glow); }
.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-end: 0;
  min-width: 84px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.3rem;
  z-index: 90;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
}
.lang-menu[hidden] { display: none; }
.lang-option {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-family: "Space Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  cursor: pointer;
  text-align: start;
}
.lang-option:hover, .lang-option[aria-selected="true"] {
  color: var(--teal-soft);
  background: rgba(0, 212, 200, 0.08);
}

.search { position: relative; }
.search input {
  width: min(220px, 42vw);
  border: 1px solid rgba(143, 160, 192, 0.28);
  background: rgba(6, 13, 28, 0.55);
  border-radius: 12px;
  padding: 0.48rem 0.75rem;
  outline: none;
}
.search input:focus { border-color: rgba(0, 212, 200, 0.7); box-shadow: 0 0 0 3px rgba(0, 212, 200, 0.16); }
.search-list {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline: 0;
  min-width: 260px;
  max-height: 320px;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.35rem;
  z-index: 90;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.search-list[hidden] { display: none; }
.search-list button {
  display: block;
  width: 100%;
  text-align: start;
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
}
.search-list button:hover, .search-list button:focus-visible { background: rgba(0, 212, 200, 0.1); }
.search-list small { display: block; color: var(--ink-muted); font-size: 0.78rem; }
.search-empty { margin: 0.4rem 0.55rem; color: var(--ink-muted); font-size: 0.88rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  font-family: "Tajawal", sans-serif;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary {
  background: linear-gradient(120deg, var(--teal-soft), var(--teal) 42%, var(--blue));
  color: #04101f;
  box-shadow: 0 8px 24px rgba(0, 212, 200, 0.25);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-soft); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; transform: none; }

.poster {
  position: relative;
  padding: 2.2rem 0 2.6rem;
  overflow: hidden;
}
.poster::before {
  content: "";
  position: absolute;
  inset: 10% 8% auto;
  height: 280px;
  background: radial-gradient(ellipse at center, rgba(0, 212, 200, 0.16), transparent 68%);
  pointer-events: none;
}
.kicker {
  display: inline-block;
  color: var(--teal);
  font-weight: 700;
  font-size: 0.82rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.28rem 0.85rem;
  background: rgba(0, 212, 200, 0.06);
  margin-bottom: 0.85rem;
}
.poster-head { max-width: 46rem; margin-bottom: 1.4rem; }
.poster h1 {
  font-size: clamp(1.9rem, 4.4vw, 3.15rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}
.hero-alt {
  margin: 0.15rem 0 0.7rem;
  color: var(--teal-soft);
  font-family: "Tajawal", sans-serif;
  font-weight: 800;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}
.lead { color: var(--ink-muted); margin: 0 0 1rem; max-width: 40rem; }
.poster-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }

.flow {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
}
.flow-item { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 0.35rem; }
.flow-card {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 0.35rem;
  justify-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(18, 32, 64, 0.96), rgba(13, 24, 48, 0.92));
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0.85rem 0.45rem 0.8rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.flow-card:hover, .flow-card.is-current {
  border-color: rgba(0, 212, 200, 0.7);
  box-shadow: var(--glow);
  transform: translateY(-2px);
}
.flow-num {
  font-family: "Space Mono", monospace;
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 700;
}
.flow-ico {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(0, 212, 200, 0.1);
  color: var(--teal-soft);
}
.flow-ico svg { width: 20px; height: 20px; }
.flow-card strong { font-size: 0.92rem; line-height: 1.35; }
.flow-arrow {
  flex: none;
  color: var(--teal);
  opacity: 0.85;
  display: grid;
  place-items: center;
}
.flow-arrow svg { width: 18px; height: 18px; }
[dir="ltr"] .flow-arrow svg { transform: scaleX(-1); }

.layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  padding-bottom: 3rem;
}
.toc {
  position: sticky;
  top: var(--header-offset);
  max-height: calc(100vh - var(--header-offset) - 1rem);
  overflow: auto;
  background: rgba(13, 24, 48, 0.88);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0.85rem 0.7rem;
}
.toc-label {
  margin: 0 0 0.45rem;
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.toc-stage { margin: 0.15rem 0; }
.toc-stage > button, .toc a.toc-stage-btn {
  width: 100%;
  display: flex;
  gap: 0.45rem;
  align-items: center;
  text-align: start;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-weight: 800;
  border-radius: 10px;
  padding: 0.38rem 0.4rem;
  cursor: pointer;
  text-decoration: none;
}
.toc-stage > button .num, .toc-num {
  font-family: "Space Mono", monospace;
  color: var(--teal);
  font-size: 0.72rem;
}
.toc-stage.is-current > button {
  background: rgba(0, 212, 200, 0.1);
  box-shadow: inset 0 0 0 1px rgba(0, 212, 200, 0.28);
}
.toc-branches { list-style: none; margin: 0; padding: 0 0 0.2rem; }
.toc-branches button {
  width: 100%;
  text-align: start;
  background: transparent;
  border: 0;
  color: var(--ink-muted);
  border-radius: 8px;
  padding: 0.22rem 0.4rem 0.22rem 1.35rem;
  cursor: pointer;
  font-size: 0.88rem;
}
[dir="ltr"] .toc-branches button { padding: 0.22rem 1.35rem 0.22rem 0.4rem; }
.toc-branches button.is-current { color: var(--teal-soft); }
.toc-branches button:hover { color: var(--ink); }

.here-chip {
  margin: 0;
  padding: 0.28rem 1rem 0.45rem;
  text-align: center;
  color: var(--teal-soft);
  font-size: 0.84rem;
  font-weight: 700;
}
.stage {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  margin-bottom: 0.85rem;
  scroll-margin-top: var(--header-offset);
}
.stage.is-open {
  border-color: rgba(0, 212, 200, 0.45);
  box-shadow: 0 0 0 1px rgba(0, 212, 200, 0.12), 0 18px 40px rgba(0, 0, 0, 0.22);
}
.stage-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-align: start;
  background: transparent;
  border: 0;
  color: inherit;
  padding: 0.95rem 1rem;
  cursor: pointer;
  border-radius: 22px;
}
.stage-num {
  flex: none;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(0, 212, 200, 0.1);
  color: var(--teal);
  font-family: "Space Mono", monospace;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(0, 212, 200, 0.2);
}
.stage.is-open .stage-num { box-shadow: var(--glow); }
.stage-h { margin: 0; font-size: inherit; }
.stage-copy { min-width: 0; flex: 1; display: grid; }
.stage-title { font-size: 1.25rem; line-height: 1.3; }
.stage-summary { margin-top: 0.15rem; color: var(--ink-muted); font-size: 0.92rem; font-weight: 500; font-family: "IBM Plex Sans Arabic", "Tajawal", sans-serif; }
.chev {
  flex: none;
  color: var(--teal-soft);
  transition: transform 0.2s ease;
}
.stage.is-open .chev { transform: rotate(180deg); }
.stage-body[hidden] { display: none; }
.stage-body { padding: 0 1rem 1rem; }
.stage.is-open .stage-body { animation: rise 0.35s ease; }
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.tabs {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.45rem;
  scrollbar-width: thin;
}
.tabs [role="tab"] {
  flex: none;
  border: 1px solid rgba(143, 160, 192, 0.28);
  background: rgba(6, 13, 28, 0.35);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.88rem;
}
.tabs [role="tab"][aria-selected="true"] {
  border-color: var(--teal);
  background: rgba(0, 212, 200, 0.14);
  color: var(--teal-soft);
  box-shadow: 0 0 0 3px rgba(0, 212, 200, 0.12);
}
.panel[hidden] { display: none; }
.panel-lead { color: var(--ink-muted); margin: 0.3rem 0 0.8rem; }

.steps { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.55rem; }
.steps li {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  background: rgba(6, 13, 28, 0.35);
  border: 1px solid rgba(143, 160, 192, 0.14);
  border-radius: 14px;
  padding: 0.55rem 0.7rem;
}
.steps .n {
  flex: none;
  width: 1.7rem;
  height: 1.7rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(0, 212, 200, 0.14);
  color: var(--teal);
  font-family: "Space Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 0.1rem;
}
.points { margin: 0 0 1rem; padding: 0; list-style: none; display: grid; gap: 0.4rem; }
.points li {
  padding-inline-start: 1rem;
  position: relative;
  color: var(--ink);
}
.points li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0.65rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--teal);
}

.callout {
  border-radius: 14px;
  padding: 0.7rem 0.85rem;
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
}
.callout strong { display: block; margin-bottom: 0.15rem; }
.callout p { margin: 0; }
.callout-tip {
  background: rgba(0, 212, 200, 0.08);
  border: 1px solid rgba(0, 212, 200, 0.28);
}
.callout-warn {
  background: rgba(255, 138, 31, 0.08);
  border: 1px solid rgba(255, 138, 31, 0.35);
}

.mock { margin: 0 0 0.9rem; }
.mock-screen { position: relative; }
.mock-browser, .mock-dialog, .mock-phone {
  background: #07101f;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
}
.mock-bar {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  background: #10192e;
  color: var(--ink-muted);
  font-family: "Space Mono", monospace;
  font-size: 0.72rem;
}
.mock-bar i { margin-inline-start: 0.4rem; font-style: normal; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #31415f; }
.dot:first-child { background: #ff8a1f; }
.zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}
.zoom img { width: 100%; height: auto; }
.mock-phone { width: min(280px, 100%); margin-inline: auto; border-radius: 28px; padding: 0.55rem; background: #10192e; }
.mock-dialog { width: min(440px, 100%); margin-inline: auto; }
.pin {
  position: absolute;
  z-index: 2;
  width: 1.7rem;
  height: 1.7rem;
  margin: -0.85rem 0 0 -0.85rem;
  border: 0;
  border-radius: 50%;
  background: var(--orange);
  color: #1a0d00;
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(255, 138, 31, 0.28), 0 8px 16px rgba(0, 0, 0, 0.35);
}
.pin:hover, .pin:focus-visible { transform: scale(1.08); }
.placeholder {
  border: 1px dashed rgba(0, 212, 200, 0.35);
  border-radius: 16px;
  min-height: 140px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.2rem;
  color: var(--ink-muted);
  background:
    linear-gradient(180deg, rgba(0, 212, 200, 0.05), transparent 50%),
    repeating-linear-gradient(-45deg, rgba(255,255,255,0.015) 0 8px, transparent 8px 16px);
}
.placeholder strong { color: var(--teal-soft); }
figcaption { color: var(--ink-muted); font-size: 0.86rem; margin-top: 0.4rem; }

.branch-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.4rem;
}
.branch-nav .btn { flex: 1; min-height: 48px; }

.closing {
  margin: 0.5rem 0 3rem;
  padding: 1.3rem;
  border-radius: 24px;
  border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 60% 80% at 100% 0%, rgba(26, 107, 255, 0.2), transparent 55%),
    linear-gradient(180deg, rgba(18, 32, 64, 0.96), rgba(13, 24, 48, 0.96));
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.2rem;
  align-items: center;
}
.qr-card {
  background: #fff;
  border-radius: 16px;
  padding: 0.45rem;
  width: 148px;
}
.qr-card img { width: 100%; height: auto; }
.qr-card span {
  display: block;
  text-align: center;
  color: #04101f;
  font-size: 0.72rem;
  font-weight: 800;
  font-family: "Space Mono", monospace;
}
.contact-line { color: var(--ink-muted); margin: 0.7rem 0 0; font-size: 0.92rem; }
.contact-line a { text-decoration: none; }
.contact-line a:hover { text-decoration: underline; }

.site-footer {
  border-top: 1px solid rgba(0, 212, 200, 0.12);
  padding: 1.4rem 0 2rem;
}
.footer-grid { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 0.8rem; }
.footer-brand img { width: 36px; height: 36px; object-fit: contain; }
.fine { color: var(--ink-muted); margin: 0; font-size: 0.88rem; }

.toc-fab {
  display: none;
  position: fixed;
  bottom: 1rem;
  inset-inline-end: 1rem;
  z-index: 70;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  background: linear-gradient(120deg, var(--teal), var(--blue));
  color: #04101f;
  font-family: "Tajawal", sans-serif;
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--glow);
}
.toc-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 85;
}
.toc-backdrop[hidden] { display: none; }

.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(1100px, 94vw);
  width: 100%;
}
.lightbox::backdrop { background: rgba(4, 8, 18, 0.9); }
.lightbox-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 0.6rem;
}
.lightbox img { width: 100%; height: auto; border-radius: 12px; }
.lightbox-top { display: flex; justify-content: space-between; gap: 0.6rem; align-items: center; margin-bottom: 0.45rem; }
.lightbox p { margin: 0.45rem 0.2rem 0.2rem; color: var(--ink-muted); }

@media (min-width: 980px) {
  .main-nav { display: flex; }
}
@media (max-width: 979px) {
  .layout { grid-template-columns: 1fr; }
  .toc {
    position: fixed;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    width: min(320px, 88vw);
    max-height: none;
    z-index: 90;
    border-radius: 0 18px 18px 0;
    transform: translateX(-110%);
    transition: transform 0.25s ease;
  }
  [dir="rtl"] .toc { transform: translateX(110%); border-radius: 18px 0 0 18px; }
  .toc.is-open { transform: none; }
  .toc-fab { display: inline-flex; }
  .closing { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .flow { flex-direction: column; gap: 0; }
  .flow-item { align-items: stretch; }
  .flow-card {
    grid-template-columns: auto auto 1fr;
    justify-items: start;
    text-align: start;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 0.75rem;
  }
  .flow-arrow { transform: rotate(-90deg); padding: 0; height: 0.85rem; }
  [dir="ltr"] .flow-arrow,
  [dir="rtl"] .flow-arrow { padding: 0; }
  .header-inner { flex-wrap: wrap; }
  .header-tools { flex: 1 1 auto; flex-wrap: wrap; justify-content: flex-end; }
  .search { flex: 1 1 9rem; min-width: 0; }
  .search input { width: 100%; }
  .search-list { min-width: 0; inset-inline: 0; }
  .here-chip { font-size: 0.78rem; line-height: 1.45; }
}
@media (max-width: 720px) {
  .container { width: min(1180px, calc(100% - 1rem)); }
  .header-inner {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    grid-template-areas: "brand lang cta" "search search search";
    align-items: center;
    gap: 0.35rem 0.4rem;
    padding-block: 0.4rem;
  }
  .header-tools { display: contents; }
  .brand { grid-area: brand; font-size: 1rem; justify-self: start; }
  .brand img { width: 32px; height: 32px; }
  .lang-switch { grid-area: lang; justify-self: end; }
  .search { grid-area: search; }
  .header-inner .btn { grid-area: cta; justify-self: start; padding: 0.42rem 0.7rem; font-size: 0.8rem; white-space: nowrap; }
  .lang-btn { padding: 0.38rem 0.5rem; }
  .search input { width: 100%; font-size: 0.92rem; padding: 0.42rem 0.7rem; }
  .here-chip {
    padding: 0.05rem 0.7rem 0.32rem;
    font-size: 0.72rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .poster { padding: 1rem 0 1.15rem; }
  .poster-head { margin-bottom: 0.75rem; }
  .poster h1 { font-size: 1.65rem; }
  .hero-alt { font-size: 0.95rem; margin-bottom: 0.4rem; }
  .lead { font-size: 0.92rem; }
  .kicker { margin-bottom: 0.5rem; }
  .flow { margin-top: 0.7rem; }
  .flow-ico { width: 32px; height: 32px; }
  .flow-card strong { font-size: 0.9rem; }
  .stage { border-radius: 16px; margin-bottom: 0.55rem; }
  .stage-toggle { padding: 0.7rem 0.65rem; gap: 0.5rem; border-radius: 16px; }
  .stage-num { width: 40px; height: 40px; border-radius: 12px; font-size: 0.78rem; }
  .stage-title { font-size: 1.05rem; }
  .stage-summary { font-size: 0.8rem; line-height: 1.45; }
  .stage-body { padding: 0 0.65rem 0.75rem; }
  .tabs [role="tab"] { font-size: 0.82rem; padding: 0.34rem 0.65rem; }
  .panel-lead, .steps li, .callout { font-size: 0.92rem; }
  .steps li { padding: 0.5rem 0.55rem; }
  .mock { margin-inline: -0.15rem; }
  .mock-browser, .mock-dialog, .mock-phone { border-radius: 14px; }
  .mock-phone { width: min(250px, 100%); }
  .pin {
    width: 1.4rem;
    height: 1.4rem;
    margin: -0.7rem 0 0 -0.7rem;
    font-size: 0.68rem;
    box-shadow: 0 0 0 3px rgba(255, 138, 31, 0.28), 0 6px 12px rgba(0, 0, 0, 0.35);
  }
  .branch-nav { flex-direction: column; }
  .closing { padding: 0.9rem; gap: 0.8rem; }
  .qr-card { width: 124px; justify-self: center; }
  .toc-fab {
    padding: 0.55rem 0.8rem;
    font-size: 0.82rem;
    bottom: calc(0.7rem + env(safe-area-inset-bottom));
  }
  main { padding-bottom: calc(3.4rem + env(safe-area-inset-bottom)); }
  .lightbox-card { padding: 0.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .node, .stage.is-open .stage-body { animation: none; }
  .flow-card, .btn, .chev, .toc { transition: none; }
}
