/* Judo AI download CTA layer (sticky bar, desktop QR, in-content and pre-footer CTAs).
 * Injected by /js/download-cta.js. All selectors are prefixed with .jdl- to avoid
 * collisions with page-level styles. */
:root {
    --jdl-blue: #0071e3;
    --jdl-blue-hover: #0077ed;
    --jdl-ink: #1d1d1f;
    --jdl-muted: rgba(29, 29, 31, 0.68);
    --jdl-line: rgba(0, 0, 0, 0.1);
    --jdl-card: #ffffff;
    --jdl-dark: #000000;
    --jdl-shadow: 0 18px 48px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
    --jdl-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Hiragino Sans", "Helvetica Neue", Arial, sans-serif;
}

.jdl-root, .jdl-root * { box-sizing: border-box; }
.jdl-root { font-family: var(--jdl-font); color: var(--jdl-ink); line-height: 1.5; }
.jdl-root h2, .jdl-root h3, .jdl-root p, .jdl-root ul { margin: 0; }
.jdl-root img { display: block; }

/* Shared button */
.jdl-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 10px 18px; border-radius: 999px;
    background: var(--jdl-blue); color: #fff !important; font: 700 15px/1.2 var(--jdl-font);
    text-decoration: none !important; white-space: nowrap; border: 0; cursor: pointer;
    transition: background-color .15s ease, transform .15s ease;
}
.jdl-btn:hover { background: var(--jdl-blue-hover); }
.jdl-btn:active { transform: scale(.98); }
.jdl-btn:focus-visible, .jdl-x:focus-visible, .jdl-pill:focus-visible { outline: 3px solid rgba(0, 113, 227, .45); outline-offset: 3px; }
.jdl-btn svg { width: 16px; height: 16px; flex: none; fill: currentColor; }
.jdl-btn--light { background: #fff; color: var(--jdl-ink) !important; }
.jdl-btn--light:hover { background: #f0f0f2; }
.jdl-btn--block { width: 100%; }

.jdl-x {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: var(--jdl-muted); cursor: pointer; flex: none;
}
.jdl-x:hover { background: rgba(0, 0, 0, .06); color: var(--jdl-ink); }
.jdl-x svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.2; fill: none; }

.jdl-icon { width: 44px; height: 44px; border-radius: 10px; flex: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); }
.jdl-qr { width: 112px; height: 112px; image-rendering: pixelated; border-radius: 6px; background: #fff; flex: none; }
.jdl-badge { font-size: 12px; color: var(--jdl-muted); }

/* 1. Mobile sticky bottom bar */
.jdl-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 2147483000;
    display: none; align-items: center; gap: 10px;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px)) 12px;
    background: rgba(255, 255, 255, .97); border-top: 1px solid var(--jdl-line);
    box-shadow: 0 -8px 28px rgba(0, 0, 0, .1);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    transform: translateY(110%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.jdl-bar.is-visible { transform: translateY(0); }
.jdl-bar__text { min-width: 0; flex: 1; }
.jdl-bar__name { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jdl-bar__sub { font-size: 12px; color: var(--jdl-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jdl-bar .jdl-btn { min-height: 40px; padding: 9px 16px; font-size: 14px; }
.jdl-bar .jdl-x { width: 28px; height: 28px; margin-left: -4px; }
@media (max-width: 820px) {
    .jdl-bar { display: flex; }
    body.jdl-has-bar { padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
}

/* 2. Desktop bottom-right QR card */
.jdl-float {
    position: fixed; right: 24px; bottom: 24px; z-index: 2147483000;
    display: none; width: 248px; padding: 16px; border-radius: 22px;
    background: var(--jdl-card); border: 1px solid var(--jdl-line);
    box-shadow: 0 12px 36px rgba(29, 29, 31, .12), 0 2px 6px rgba(29, 29, 31, .04);
    opacity: 0; transform: translateY(12px); pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}
.jdl-float.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.jdl-float__head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.jdl-float__head .jdl-icon { width: 40px; height: 40px; border-radius: 10px; }
.jdl-float__brand { flex: 1; min-width: 0; }
.jdl-float__name { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.jdl-float__sub { font-size: 11px; line-height: 1.4; color: var(--jdl-muted); overflow-wrap: anywhere; }
.jdl-float .jdl-x { width: 44px; height: 44px; margin-right: -8px; }
.jdl-float__qr {
    display: flex; justify-content: center; padding: 12px; border-radius: 14px;
    background: #f5f7fa; border: 1px solid rgba(29, 29, 31, .05);
}
.jdl-float .jdl-qr { width: 128px; height: 128px; border-radius: 0; }
.jdl-float__qr:focus-visible { outline: 3px solid var(--jdl-blue); outline-offset: 3px; }
.jdl-float__title { font-weight: 600; font-size: 13px; line-height: 1.45; text-align: center; margin: 12px 0 14px !important; }
.jdl-float .jdl-btn { width: 100%; min-height: 44px; font-size: 13px; white-space: normal; border-radius: 12px; }
.jdl-float.is-compact { width: 156px; right: 12px; bottom: 16px; padding: 12px; border-radius: 18px; }
.jdl-float.is-compact .jdl-float__head { gap: 0; margin-bottom: 8px; }
.jdl-float.is-compact .jdl-float__head .jdl-icon, .jdl-float.is-compact .jdl-float__sub { display: none; }
.jdl-float.is-compact .jdl-float__name { font-size: 13px; }
.jdl-float.is-compact .jdl-float__qr { padding: 8px; border-radius: 10px; }
.jdl-float.is-compact .jdl-qr { width: 112px; height: 112px; }
.jdl-float.is-compact .jdl-float__title { font-size: 12px; margin: 10px 0 !important; }
.jdl-float.is-compact .jdl-btn { padding: 10px 8px; font-size: 12px; gap: 6px; }
.jdl-pill {
    position: fixed; right: 24px; bottom: 24px; z-index: 2147483000;
    display: none; align-items: center; gap: 10px; min-height: 52px; max-width: calc(100vw - 48px);
    padding: 8px 16px 8px 8px; border-radius: 16px;
    background: var(--jdl-card); color: var(--jdl-ink); border: 1px solid var(--jdl-line);
    box-shadow: 0 8px 24px rgba(29, 29, 31, .12); font: 600 14px/1.4 var(--jdl-font); cursor: pointer;
}
.jdl-pill:hover { background: #f5f7fa; }
.jdl-pill img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
@media (min-width: 821px) and (hover: hover) and (pointer: fine) {
    .jdl-float { display: block; }
    .jdl-pill.is-visible { display: inline-flex; }
}

/* 3. Article-top strip */
.jdl-top {
    display: flex; align-items: center; gap: 14px; margin: 0 0 28px; padding: 14px 16px;
    border-radius: 12px; background: #eef5ff; border: 1px solid rgba(0, 113, 227, .18);
}
.jdl-top__text { flex: 1; min-width: 0; font-size: 15px; line-height: 1.55; color: var(--jdl-ink); }
.jdl-top .jdl-btn { min-height: 40px; font-size: 14px; }
@media (max-width: 560px) {
    .jdl-top { flex-wrap: wrap; }
    .jdl-top .jdl-icon { display: none; }
    .jdl-top .jdl-btn { width: 100%; }
}

/* 4. Mid-article card */
.jdl-mid {
    display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
    margin: 36px 0; padding: 24px; border-radius: 16px; background: #fff;
    border: 1px solid var(--jdl-line); box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
}
.jdl-mid__title { font-size: 20px; font-weight: 700; line-height: 1.35; margin-bottom: 12px !important; }
.jdl-list { list-style: none; padding: 0 !important; margin: 0 0 16px !important; display: grid; gap: 6px; }
.jdl-list li { position: relative; padding-left: 26px; font-size: 15px; line-height: 1.5; margin: 0 !important; }
.jdl-list li::before {
    content: ""; position: absolute; left: 0; top: .2em; width: 18px; height: 18px; border-radius: 50%;
    background: var(--jdl-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/12px no-repeat;
}
.jdl-mid__qr { text-align: center; }
.jdl-mid__qr .jdl-badge { display: block; margin-top: 6px; max-width: 128px; }
@media (max-width: 820px), (hover: none) { .jdl-mid { grid-template-columns: 1fr; } .jdl-mid__qr { display: none; } .jdl-mid .jdl-btn { width: 100%; } }

/* 5. Sidebar card */
.jdl-side {
    margin: 0; padding: 20px; border-radius: 12px; background: var(--jdl-dark); color: #fff;
}
.jdl-side .jdl-icon { width: 48px; height: 48px; margin-bottom: 12px; box-shadow: none; }
.jdl-side__title { font-size: 18px; font-weight: 700; line-height: 1.35; color: #fff; margin-bottom: 10px !important; }
.jdl-side .jdl-list li { color: rgba(255, 255, 255, .86); font-size: 14px; }
.jdl-side .jdl-badge { display: block; margin-top: 8px; text-align: center; color: rgba(255, 255, 255, .6); }
.technique-contents .jdl-side { display: grid; grid-template-columns: 36px 1fr; gap: 6px 10px; align-items: center; margin-top: 18px; padding: 14px; }
.technique-contents .jdl-side .jdl-icon { width: 36px; height: 36px; border-radius: 8px; margin: 0; }
.technique-contents .jdl-side .jdl-side__title { font-size: 14px; margin: 0 !important; }
.technique-contents .jdl-side .jdl-list { display: none; }
.technique-contents .jdl-side .jdl-btn, .technique-contents .jdl-side .jdl-badge { grid-column: 1 / -1; }
.technique-contents .jdl-side .jdl-btn { min-height: 38px; font-size: 13px; }
.technique-contents .jdl-side .jdl-badge { margin-top: 0; }
@media (max-width: 1080px) { .technique-contents .jdl-side { display: none; } }
@media (max-width: 1080px) { .jdl-side { display: none; } }

/* 6. Pre-footer band */
.jdl-pre { background: var(--jdl-dark); color: #fff; padding: 64px 20px; }
.jdl-pre__inner { width: min(1120px, 100%); margin: 0 auto; display: grid; grid-template-columns: auto 1fr auto; gap: 32px; align-items: center; }
.jdl-pre .jdl-icon { width: 88px; height: 88px; border-radius: 20px; box-shadow: none; }
.jdl-pre__title { font-size: clamp(26px, 3.4vw, 40px); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; color: #fff; margin-bottom: 12px !important; }
.jdl-pre__body { font-size: 17px; color: rgba(255, 255, 255, .78); margin-bottom: 20px !important; max-width: 60ch; }
.jdl-pre__qr { padding: 14px; background: #fff; border-radius: 16px; text-align: center; }
.jdl-pre__qr .jdl-qr { width: 132px; height: 132px; }
.jdl-pre__qr .jdl-badge { display: block; margin-top: 6px; max-width: 132px; color: var(--jdl-muted); }
.jdl-pre .jdl-list li { color: rgba(255, 255, 255, .86); }
.jdl-pre .jdl-list { grid-template-columns: repeat(3, auto); justify-content: start; column-gap: 24px; }
@media (max-width: 820px), (hover: none) {
    .jdl-pre { padding: 48px 20px; }
    .jdl-pre__inner { grid-template-columns: 1fr; gap: 18px; text-align: left; }
    .jdl-pre .jdl-icon { width: 64px; height: 64px; border-radius: 15px; }
    .jdl-pre__qr { display: none; }
    .jdl-pre .jdl-list { grid-template-columns: 1fr; }
    .jdl-pre .jdl-btn { width: 100%; min-height: 50px; font-size: 16px; }
}

/* 7. Nav download button (pages whose nav has no App Store link) */
.jdl-nav {
    display: inline-flex !important; align-items: center; min-height: 34px; padding: 7px 14px !important;
    border-radius: 999px; background: var(--jdl-blue); color: #fff !important; font-weight: 700;
    text-decoration: none !important; white-space: nowrap;
}
.jdl-nav:hover { background: var(--jdl-blue-hover); }

/* 8. Desktop exit-intent dialog */
.jdl-modal {
    position: fixed; inset: 0; z-index: 2147483001; display: none; align-items: center; justify-content: center;
    padding: 20px; background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.jdl-modal.is-open { display: flex; }
.jdl-modal__card {
    position: relative; width: min(440px, 100%); padding: 32px 28px 26px; border-radius: 20px;
    background: #fff; box-shadow: var(--jdl-shadow); text-align: center;
}
.jdl-modal__card .jdl-x { position: absolute; top: 12px; right: 12px; }
.jdl-modal__card .jdl-icon { width: 64px; height: 64px; border-radius: 15px; margin: 0 auto 14px; }
.jdl-modal__title { font-size: 22px; font-weight: 700; line-height: 1.3; margin-bottom: 8px !important; }
.jdl-modal__body { font-size: 15px; color: var(--jdl-muted); margin-bottom: 18px !important; }
.jdl-modal .jdl-qr { width: 168px; height: 168px; margin: 0 auto 18px; }
.jdl-modal__later { display: block; margin: 10px auto 0; border: 0; background: none; color: var(--jdl-muted); font: 14px var(--jdl-font); cursor: pointer; text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
    .jdl-bar, .jdl-float, .jdl-btn { transition: none; }
}
@media print {
    .jdl-bar, .jdl-float, .jdl-pill, .jdl-modal, .jdl-top, .jdl-mid, .jdl-side, .jdl-pre, .jdl-nav { display: none !important; }
    body.jdl-has-bar { padding-bottom: 0 !important; }
}
