/* How-to guides */
.guide-hero { padding: 64px 0 40px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, var(--brand-50), rgba(255, 255, 255, 0)); }
.guide-hero .wrap { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.guide-hero .crumbs { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.guide-hero .crumbs a { color: var(--muted); }
.guide-hero .crumbs a:hover { color: var(--brand-600); }
.guide-hero h1 { font-size: clamp(36px, 5vw, 58px); display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.guide-hero h1 img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 10px 24px -10px rgba(26, 140, 255, .6); }
.guide-hero .lead { margin-top: 16px; max-width: 640px; }
.guide-hero .hero-side { display: flex; flex-direction: column; gap: 10px; align-items: stretch; min-width: 250px; }
.guide-hero .hero-side .dl-meta { justify-content: center; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.quick a { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--border); color: var(--ink); font-size: 14px; font-weight: 500; transition: all .2s; }
.quick a:hover { border-color: var(--brand-100); color: var(--brand-600); transform: translateY(-2px); }
.quick .i { width: 16px; height: 16px; color: var(--brand-500); }

.guide-layout { display: grid; grid-template-columns: 270px 1fr; gap: 48px; padding: 56px 0 100px; align-items: start; }
.toc { position: sticky; top: 98px; max-height: calc(100vh - 120px); overflow: auto; padding-inline-end: 6px; }
.toc h4 { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; counter-reset: t; }
.toc a { counter-increment: t; display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 12px; color: var(--muted); font-size: 15px; font-weight: 500; border-inline-start: 3px solid transparent; transition: all .2s; }
.toc a::before { content: counter(t); width: 24px; height: 24px; flex: none; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface); color: var(--muted); }
.toc a:hover { background: var(--surface); color: var(--ink); }
.toc a.active { background: var(--brand-50); color: var(--brand-600); border-color: var(--brand-500); }
.toc a.active::before { background: var(--grad); color: #fff; }
.toc .progress { height: 4px; border-radius: 2px; background: var(--border); margin: 14px 12px 0; overflow: hidden; }
.toc .progress i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .2s; }

.steps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; min-width: 0; }
.step { background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: 34px; box-shadow: var(--shadow-card); scroll-margin-top: 96px; }
.step-head { display: flex; gap: 16px; align-items: flex-start; }
.step-num { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 700; font-size: 18px; box-shadow: var(--shadow-azure); }
.step-head h2 { font-size: clamp(24px, 2.6vw, 30px); }
.step-head p { color: var(--muted); margin-top: 8px; font-size: 17px; }
.how { margin: 24px 0 0; padding: 0; list-style: none; counter-reset: h; display: grid; gap: 12px; }
.how li { counter-increment: h; position: relative; padding-inline-start: 40px; line-height: 1.65; min-height: 28px; }
.how li::before { content: counter(h); position: absolute; inset-inline-start: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); font-weight: 700; font-size: 13px; border: 1px solid var(--brand-100); }
.ui { display: inline-flex; align-items: center; gap: 5px; padding: 1px 9px; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: .92em; color: var(--ink); white-space: nowrap; }
.ui .i { width: 14px; height: 14px; color: var(--brand-500); }

.shot { position: relative; margin-top: 26px; cursor: zoom-in; }
.shot .window img { width: 100%; height: auto; background: var(--surface); }
.shot .marker { position: absolute; transform: translate(-50%, -50%); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .9), var(--shadow-azure); animation: ping 2.4s infinite; z-index: 2; }
.shot .ring { position: absolute; border: 2.5px solid var(--brand-500); border-radius: 10px; box-shadow: 0 0 0 4px rgba(26, 140, 255, .18); pointer-events: none; z-index: 1; }
@keyframes ping { 0%, 100% { box-shadow: 0 0 0 4px rgba(255, 255, 255, .9), 0 0 0 0 rgba(26, 140, 255, .5); } 50% { box-shadow: 0 0 0 4px rgba(255, 255, 255, .9), 0 0 0 10px rgba(26, 140, 255, 0); } }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; color: var(--muted); font-size: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend b { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; font-size: 12px; }
.tip { display: flex; gap: 12px; margin-top: 22px; padding: 14px 18px; border-radius: 16px; background: var(--brand-50); border: 1px solid var(--brand-100); }
.tip .i { color: var(--brand-500); margin-top: 2px; }
.tip p { font-size: 15px; }
.tip.warn { background: #fff8eb; border-color: #ffe2a8; }
.tip.warn .i { color: #c98300; }
.shots-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.shots-2 .shot { margin-top: 26px; }
.shots-2 figcaption { margin-top: 10px; color: var(--muted); font-size: 14px; text-align: center; }

.keys { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 22px; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.keys td { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.keys tr:last-child td { border: 0; }
.keys tr:nth-child(even) td { background: var(--surface); }
.keys td:first-child { white-space: nowrap; width: 40%; }

.types { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 22px; }
.type { border: 1px solid var(--border); border-radius: 18px; padding: 18px; background: var(--surface); }
.type h3 { display: flex; align-items: center; gap: 10px; font-size: 17px; margin-bottom: 8px; }
.type h3 .i { color: var(--brand-500); }
.type p { color: var(--muted); font-size: 14px; }

.next { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 8px; padding: 30px; border-radius: 24px; background: var(--grad); color: #fff; align-items: center; box-shadow: 0 24px 50px -24px rgba(8, 96, 191, .7); }
.next h2 { color: #fff; font-size: 26px; }
.next p { color: rgba(255, 255, 255, .85); margin-top: 6px; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(11, 18, 32, .82); display: grid; place-items: center; padding: 3vw; cursor: zoom-out; opacity: 0; pointer-events: none; transition: opacity .25s; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 100%; max-height: 92vh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }

/* ---- interactive demos ---- */
.demo { margin-top: 26px; border: 1px solid var(--brand-100); border-radius: 22px; background: linear-gradient(180deg, #fff, var(--brand-50)); padding: 22px; }
.demo-head { display: flex; align-items: center; gap: 10px; font-weight: 600; margin-bottom: 14px; color: var(--brand-600); }
.demo-head .i { width: 18px; height: 18px; }
.demo-hint { color: var(--muted); font-size: 14px; margin-top: 12px; text-align: center; }

/* PDF mini editor */
.mini-app { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: #e9eff7; box-shadow: var(--shadow-card); }
.mini-bar { display: flex; gap: 4px; padding: 8px; background: #fff; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.mini-bar button { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: none; border-radius: 9px; padding: 6px 10px; font: 500 11px "Space Grotesk", sans-serif; color: var(--ink); cursor: pointer; }
.mini-bar button .i { width: 18px; height: 18px; }
.mini-bar button:hover { background: var(--brand-50); }
.mini-bar button.on { background: var(--brand-100); color: var(--brand-600); }
.mini-hint { padding: 8px 14px; background: #f7f9fc; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; min-height: 37px; }
.mini-hint .i { width: 15px; height: 15px; color: var(--brand-500); }
.mini-canvas { padding: 22px; display: grid; place-items: center; }
.mini-page { width: min(520px, 100%); aspect-ratio: 8.5 / 7.4; background: #fff; box-shadow: 0 2px 10px rgba(11, 18, 32, .12); padding: 30px 34px; position: relative; font-family: Arial, sans-serif; color: #1d2433; overflow: hidden; }
.mini-page .ln { position: relative; border: 1px dashed transparent; border-radius: 3px; padding: 1px 3px; margin: 0 -4px; outline: none; }
.mini-page.mode-edit .ln:hover { border-color: rgba(26, 140, 255, .7); background: rgba(26, 140, 255, .05); cursor: text; }
.mini-page .ln[contenteditable="true"] { border: 2px solid var(--brand-500); background: #fff; box-shadow: 0 0 0 5px rgba(26, 140, 255, .14); }
.mini-page .t1 { font-size: 22px; font-weight: 700; color: #0b5fb8; margin-bottom: 4px; }
.mini-page .t2 { font-size: 12px; color: #5b6676; margin-bottom: 16px; }
.mini-page .p { font-size: 13px; line-height: 1.55; margin-bottom: 3px; }
.mini-page .hl { background: rgba(255, 212, 0, .55); }
.mini-page .sigline { position: absolute; left: 34px; right: 50%; bottom: 40px; border-top: 1px solid #b8c2d0; font-size: 11px; color: #8a95a5; padding-top: 4px; }
.mini-page .sig { position: absolute; left: 40px; bottom: 46px; font: 30px "Segoe Script", "Brush Script MT", cursive; color: #14306e; opacity: 0; transform: scale(.9); transition: all .35s; }
.mini-page .sig.on { opacity: 1; transform: none; }
.mini-page svg.ink { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.mini-page.mode-pen { cursor: crosshair; }


@media (max-width: 980px) {
  .guide-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; max-height: none; }
  .toc ol { grid-template-columns: repeat(2, 1fr); }
  .guide-hero .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .step { padding: 22px; }
  .shots-2, .types, .toc ol { grid-template-columns: 1fr; }
}
/* the Shift demo itself is styled in styles.css (shared with the app page) */
.demo .shift-demo { border-radius: 16px; min-height: 480px; }
.quick a, .toc a, .crumbs a, .guide-hero a { text-decoration: none; }
