:root {
    --bg: #0b1419;
    --bg-soft: #101d24;
    --surface: #14232b;
    --surface-2: #1a2c35;
    --border: #233842;
    --text: #e9f1f2;
    --muted: #93a7ad;
    --accent: #2fbf98;
    --accent-strong: #3fd9ae;
    --accent-ink: #062018;
    --notice: #2b2a17;
    color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--bg); overflow-x: clip; }
body {
    margin: 0;
    min-height: 100vh;
    position: relative;
    overflow: clip;
    background:
        radial-gradient(ellipse 60% 40% at 75% 20%, rgba(47, 191, 152, .10), transparent 70%),
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px) 0 0 / 32px 32px,
        var(--bg);
    color: var(--text);
    font: 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wave { position: absolute; z-index: 0; pointer-events: none; border-radius: 50%; filter: blur(.5px); }
.wave--top { top: -180px; right: -160px; width: 520px; height: 300px; background: linear-gradient(200deg, #1f6f5c, #12423a); opacity: .55; }
.wave--bottom { bottom: -220px; left: -200px; width: 640px; height: 360px; background: linear-gradient(20deg, #1f6f5c, #12423a); opacity: .45; }
.top, main, .foot { position: relative; z-index: 1; }
main { max-width: 1120px; margin: 0 auto; padding: 0 16px 56px; }
.top { max-width: 1120px; margin: 0 auto; padding: 22px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.top-nav { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.top-nav a { color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 500; padding: 7px 14px; border-radius: 999px; transition: color .2s ease, background-color .2s ease, box-shadow .2s ease; }
.top-nav a:hover, .top-nav a[aria-current] { color: var(--text); background: var(--surface); }
.top-nav .top-nav__buy { color: var(--accent); box-shadow: inset 0 0 0 1.5px rgba(47, 191, 152, .5); }
.top-nav .top-nav__buy:hover { color: var(--accent-ink); background: var(--accent); box-shadow: 0 6px 20px rgba(47, 191, 152, .3); }
.hero__links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 22px 0 0; font-size: .95rem; }
.hero__links a { color: var(--accent); text-decoration: none; }
.hero__links a span { display: inline-block; transition: transform .2s ease; }
.hero__links a:hover { color: var(--accent-strong); }
.hero__links a:hover span { transform: translateX(3px); }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--accent); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 1.35rem; letter-spacing: -.01em; }
.brand em, h1 em { font-style: normal; color: var(--accent); }
.brand small { color: var(--muted); font-weight: 400; font-size: .85rem; margin-left: 4px; padding: 2px 8px; border: 1px solid var(--border); border-radius: 999px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
/* "by Digitalsky": the Digitalsky logo (thin "Digital", bold "Sky" under a line cloud), as on digitalsky.fr */
.by-digitalsky { display: inline-flex; align-items: baseline; gap: 7px; color: var(--muted); text-decoration: none; padding-left: 16px; border-left: 1px solid var(--border); align-self: center; }
.by-digitalsky__by { font-size: .85rem; }
.ds-logo { display: inline-flex; align-items: baseline; padding-top: .5em; color: var(--text); font-size: 1.1rem; line-height: 1; letter-spacing: -.03em; white-space: nowrap; }
.ds-logo__digital { font-weight: 300; }
.ds-logo__sky { position: relative; margin-left: .04em; font-weight: 800; letter-spacing: -.04em; }
.ds-logo__cloud { position: absolute; left: -.02em; bottom: .64em; width: 1.72em; height: 1.03em; overflow: visible; }
.ds-logo__cloud path { fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s ease; }
.by-digitalsky:hover .ds-logo__cloud path { stroke: var(--accent); }

.hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; padding: 40px 0 48px; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); line-height: 1; margin: 0 0 10px; font-weight: 600; letter-spacing: -.02em; }
.tagline { color: var(--muted); font-size: 1.2rem; margin: 0 0 22px; }
.lead { color: #c3d2d6; font-size: 1.08rem; margin: 0 0 28px; max-width: 520px; }
.hero__art { min-width: 0; perspective: 1400px; }
.tilt { transform-style: preserve-3d; }
.tree { transform: rotateX(calc(34deg + var(--ty, 0deg))) rotateY(var(--tx, 0deg)) rotateZ(-3deg); transform-origin: 50% 60%; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.t-cursor { fill: #fff; stroke: #0b1419; stroke-width: 1.2; stroke-linejoin: round; opacity: 0; }
.tree { width: 100%; height: auto; display: block; overflow: visible; filter: drop-shadow(0 20px 40px rgba(0,0,0,.35)); }
.t-card { fill: var(--surface-2); stroke: #2a4250; stroke-width: 1; }
.t-line { fill: #3a5361; }
.t-line--dim { fill: #2b414d; }
.t-badge { fill: var(--accent); }
.t-link path { fill: none; stroke: #2f6f61; stroke-width: 2; stroke-dasharray: 1; }
.t-flow path { fill: none; stroke: var(--accent-strong); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 10 420; opacity: .9; }
.t-glyph { fill: #fff; font: 700 15px system-ui, sans-serif; }
.t-dot { fill: #3a5361; }
.t-media { fill: #2c4e63; }
.t-mountain { fill: #4f7d96; }
.t-sun { fill: #f5d76e; }
.t-shine { fill: url(#t-shine-gradient); transform-box: fill-box; transform: translateX(-110%); }
.t-halo { fill: var(--accent); opacity: .05; filter: blur(30px); transform-box: fill-box; transform-origin: center; }

/* Tree animations */
@keyframes t-enter { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes t-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes t-glow {
    0%, 70%, 100% { stroke: #2a4250; }
    80% { stroke: var(--accent); }
}
@keyframes t-sweep { 0% { transform: translateX(-110%); } 30%, 100% { transform: translateX(110%); } }
@keyframes t-flow { from { stroke-dashoffset: 430; } to { stroke-dashoffset: 0; } }
@keyframes t-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes t-halo { 0%, 100% { opacity: .04; transform: scale(1); } 50% { opacity: .09; transform: scale(1.06); } }
/* Drag & drop: the "-lift" card is picked up, carried over its neighbour and dropped,
   while the other card slides into the free slot. 12 s cycle, the move goes and comes back. */
@keyframes t-swap-a-lift {
    0%, 14% { transform: translate(0, 0) scale(1); filter: none; }
    20% { transform: translate(0, -14px) scale(1.1); filter: drop-shadow(0 14px 12px rgba(0,0,0,.55)); }
    38% { transform: translate(-140px, -14px) scale(1.1); filter: drop-shadow(0 14px 12px rgba(0,0,0,.55)); }
    44%, 64% { transform: translate(-140px, 0) scale(1); filter: none; }
    70% { transform: translate(-140px, -14px) scale(1.1); filter: drop-shadow(0 14px 12px rgba(0,0,0,.55)); }
    88% { transform: translate(0, -14px) scale(1.1); filter: drop-shadow(0 14px 12px rgba(0,0,0,.55)); }
    94%, 100% { transform: translate(0, 0) scale(1); filter: none; }
}
@keyframes t-swap-a {
    0%, 24% { transform: translate(0, 0); }
    38%, 74% { transform: translate(140px, 0); }
    88%, 100% { transform: translate(0, 0); }
}
@keyframes t-swap-b-lift {
    0%, 14% { transform: translate(0, 0) scale(1); filter: none; }
    20% { transform: translate(0, -14px) scale(1.1); filter: drop-shadow(0 14px 12px rgba(0,0,0,.55)); }
    36% { transform: translate(-80px, -14px) scale(1.1); filter: drop-shadow(0 14px 12px rgba(0,0,0,.55)); }
    42%, 64% { transform: translate(-80px, 0) scale(1); filter: none; }
    70% { transform: translate(-80px, -14px) scale(1.1); filter: drop-shadow(0 14px 12px rgba(0,0,0,.55)); }
    86% { transform: translate(0, -14px) scale(1.1); filter: drop-shadow(0 14px 12px rgba(0,0,0,.55)); }
    92%, 100% { transform: translate(0, 0) scale(1); filter: none; }
}
@keyframes t-swap-b {
    0%, 22% { transform: translate(0, 0); }
    36%, 74% { transform: translate(80px, 0); }
    86%, 100% { transform: translate(0, 0); }
}
@keyframes t-cursor {
    0%, 12% { opacity: 0; transform: translate(10px, 10px); }
    18%, 40% { opacity: 1; transform: translate(0, 0); }
    46%, 66% { opacity: 0; transform: translate(0, 0); }
    70%, 90% { opacity: 1; transform: translate(0, 0); }
    96%, 100% { opacity: 0; transform: translate(10px, 10px); }
}
@keyframes t-tilt { 0%, 100% { transform: rotateX(0deg); } 50% { transform: rotateX(3deg); } }
/* Entrance: each card flies in from its own direction, then the links draw between them. */
@keyframes t-fly {
    0% { opacity: 0; transform: translate(var(--fx), var(--fy)) rotate(var(--fr)) scale(.55); }
    60% { opacity: 1; }
    82% { transform: translate(0, -4px) rotate(0deg) scale(1.03); }
    100% { opacity: 1; transform: none; }
}
@keyframes t-land { 0% { stroke: var(--accent-strong); stroke-width: 2; } 100% { stroke: #2a4250; stroke-width: 1; } }
@keyframes t-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes t-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes t-sun { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }

@media (prefers-reduced-motion: no-preference) {
    .t-node {
        transform-box: fill-box;
        transform-origin: center;
        animation:
            t-fly .9s cubic-bezier(.2, .8, .25, 1) calc(var(--i) * 90ms) both,
            t-float 6s ease-in-out calc(2.2s + var(--i) * .35s) infinite;
    }
    .t-node .t-card {
        animation:
            t-land .8s ease-out calc(.85s + var(--i) * 90ms) both,
            t-glow 7s ease-in-out calc(3s + var(--i) * .55s) infinite;
    }
    .t-node .t-shine { animation: t-sweep 7s ease-in-out calc(3s + var(--i) * .55s) infinite; }
    .t-link path { animation: t-draw .6s ease-out var(--d) both; }
    .t-flow { animation: t-fade-in .8s ease 2.4s both; }
    .t-badge { animation: t-pulse 2.4s ease-in-out calc(var(--i) * .3s) infinite; }
    .t-flow path { animation: t-flow 3.2s linear calc(var(--i) * -.8s) infinite; }
    .t-halo { animation: t-halo 9s ease-in-out infinite; }
    .t-sun { transform-box: fill-box; animation: t-sun 4s ease-in-out infinite; }
    .t-move { transform-box: fill-box; transform-origin: center; }
    .t-swap-a-lift { animation: t-swap-a-lift 12s cubic-bezier(.45, 0, .25, 1) 3.5s infinite; }
    .t-swap-a { animation: t-swap-a 12s cubic-bezier(.45, 0, .25, 1) 3.5s infinite; }
    .t-swap-b-lift { animation: t-swap-b-lift 12s cubic-bezier(.45, 0, .25, 1) 9.5s infinite; }
    .t-swap-b { animation: t-swap-b 12s cubic-bezier(.45, 0, .25, 1) 9.5s infinite; }
    .t-swap-a-lift .t-cursor { animation: t-cursor 12s ease-in-out 3.5s infinite; }
    .t-swap-b-lift .t-cursor { animation: t-cursor 12s ease-in-out 9.5s infinite; }
    .tilt { animation: t-tilt 14s ease-in-out infinite; }
    .hero__text > * { animation: t-enter .7s cubic-bezier(.2, .7, .2, 1) both; }
    .hero__text > :nth-child(2) { animation-delay: .08s; }
    .hero__text > :nth-child(3) { animation-delay: .16s; }
    .hero__text > :nth-child(n+4) { animation-delay: .24s; }
}
@media (prefers-reduced-motion: reduce) {
    .t-flow { display: none; }
}

.button {
    display: inline-block;
    background: var(--accent);
    color: var(--accent-ink);
    border: 0;
    border-radius: 10px;
    padding: 14px 30px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(47, 191, 152, .25);
    transition: background .15s, transform .15s;
}
.button:hover { background: var(--accent-strong); transform: translateY(-1px); }
.button.secondary { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.button:disabled, .button.is-disabled { opacity: .45; pointer-events: none; box-shadow: none; }
.button .spinner { display: none; }
.button.is-loading { opacity: .75; cursor: progress; }
.button.is-loading .spinner { display: inline-block; width: 1em; height: 1em; margin-right: .6em; vertical-align: -.15em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .button.is-loading .spinner { animation-duration: 2.4s; } }
.meta { color: var(--muted); font-size: .9rem; margin-top: 12px; }
.notice { background: var(--notice); border: 1px solid #4a4520; border-radius: 10px; padding: 12px 16px; max-width: 520px; margin: 0 0 22px; }
.hp { position: absolute; left: -9999px; }

/* Early access offer (home page) and its discount badge on the "Get PageTree" link */
.promo { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 8px 0 0; padding: 14px 18px; border: 1px solid rgba(47, 191, 152, .45); border-radius: 14px; background: linear-gradient(90deg, rgba(47, 191, 152, .14), rgba(20, 35, 43, .85) 70%); box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.promo__icon { flex: none; width: 24px; height: 24px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.promo__text { flex: 1 1 220px; margin: 0; color: #c3d2d6; }
.promo__text strong { color: var(--text); }
.promo__text code { padding: 2px 8px; border: 1px dashed rgba(47, 191, 152, .6); border-radius: 6px; background: var(--bg-soft); color: var(--accent-strong); font: 600 .95em ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .04em; white-space: nowrap; }
.promo__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.promo__copy { padding: 7px 14px; border: 1px solid var(--accent); border-radius: 999px; background: none; color: var(--accent); font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; transition: color .2s ease, background-color .2s ease; }
.promo__copy:hover, .promo__copy.is-copied { background: var(--accent); color: var(--accent-ink); }
.promo__cta { color: var(--accent); font-size: .95rem; font-weight: 600; text-decoration: none; }
.promo__cta:hover { color: var(--accent-strong); }
.promo__copy:focus-visible, .promo__cta:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; }
.top-nav__promo { margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .75rem; font-weight: 700; white-space: nowrap; }
.top-nav .top-nav__buy:hover .top-nav__promo { background: var(--accent-ink); color: var(--accent); }
.feedback-invite a { color: var(--accent); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 8px 0 48px; }
.features article, .card {
    background: rgba(20, 35, 43, .85);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
}
.features article {
    position: relative;
    overflow: hidden;
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease, background .25s ease;
}
/* Spotlight that follows the pointer (--mx / --my set in home.php). */
.features article::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(47, 191, 152, .14), transparent 70%);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}
.features article > * { position: relative; }
.features article:hover {
    transform: translateY(-4px);
    border-color: rgba(47, 191, 152, .55);
    background: rgba(24, 42, 51, .92);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .35), 0 0 0 1px rgba(47, 191, 152, .15);
}
.features article:hover::before { opacity: 1; }
.feature-icon { transition: transform .3s ease, filter .3s ease; }
.features article:hover .feature-icon { transform: scale(1.12) rotate(-4deg); filter: drop-shadow(0 0 6px rgba(63, 217, 174, .6)); }
.features article:hover h2 { color: #fff; }
.feature-icon { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 10px; }
.features h2 { font-size: 1.05rem; margin: 0 0 6px; }
.features p { margin: 0; color: var(--muted); font-size: .95rem; }

.showcase { position: relative; text-align: center; margin: 8px 0 64px; padding: 56px 0 0; }
.showcase::before { content: ""; position: absolute; left: 50%; top: 120px; width: min(900px, 90%); height: 60%; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(47, 191, 152, .22), transparent); filter: blur(40px); pointer-events: none; }
.showcase > * { position: relative; }
.showcase__eyebrow { display: inline-block; margin: 0 0 14px; padding: 4px 12px; border: 1px solid rgba(47, 191, 152, .4); border-radius: 999px; color: var(--accent); font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.showcase h2 { margin: 0 auto 12px; max-width: 760px; font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.15; letter-spacing: -.01em; }
.showcase__lead { margin: 0 auto 32px; max-width: 620px; color: var(--muted); font-size: 1.05rem; }
.showcase__frame { max-width: 980px; margin: 0 auto; padding: 1px; border-radius: 18px; background: linear-gradient(140deg, rgba(63, 217, 174, .7), rgba(35, 56, 66, .6) 40%, rgba(35, 56, 66, .6) 60%, rgba(63, 217, 174, .5)); box-shadow: 0 30px 80px rgba(0, 0, 0, .5), 0 0 60px rgba(47, 191, 152, .15); }
.video__player { position: relative; display: block; aspect-ratio: 16 / 9; width: 100%; border: 0; border-radius: 17px; overflow: hidden; background: var(--surface); }
.video__player img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease, filter .4s ease; }
.video__player::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(11, 20, 25, .45), transparent 45%); pointer-events: none; }
.video__play { position: absolute; z-index: 1; inset: 0; margin: auto; width: 92px; height: 92px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 40px rgba(47, 191, 152, .55); transition: transform .2s ease, background .2s ease; }
.video__play::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 2px solid rgba(63, 217, 174, .5); }
.video__play svg { width: 40px; height: 40px; margin-left: 5px; fill: currentColor; }
.video__duration { position: absolute; z-index: 1; right: 16px; bottom: 14px; padding: 3px 9px; border-radius: 6px; background: rgba(6, 12, 15, .8); color: #fff; font-size: .85rem; font-variant-numeric: tabular-nums; }
.video__player:hover img, .video__player:focus-visible img { transform: scale(1.02); filter: brightness(.9); }
.video__player:hover .video__play, .video__player:focus-visible .video__play { transform: scale(1.08); background: var(--accent-strong); }
.video__player:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 4px; }
.showcase__links { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px 28px; margin: 32px 0 0; }
.showcase__links a:not(.button) { color: var(--muted); text-decoration: none; }
.showcase__links a:not(.button):hover { color: var(--accent); }
.hero__video { display: inline-flex; align-items: center; gap: 7px; }
.hero__video svg { width: 18px; height: 18px; padding: 4px; border-radius: 50%; background: var(--accent); fill: var(--accent-ink); }
@media (prefers-reduced-motion: no-preference) {
    .video__play::before { animation: video-pulse 2.4s ease-out infinite; }
    @keyframes video-pulse { 0% { transform: scale(.9); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) { .video__player img, .video__play { transition: none; } }

.how { max-width: 720px; margin: 0 auto; }
.how h2 { font-size: 1.3rem; }
.how li { margin-bottom: 8px; color: #c3d2d6; }
.how li strong { color: var(--text); }
.how code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; }

.session { padding: 32px 0; }
.session > h1, .session > .lead { text-align: center; margin-left: auto; margin-right: auto; }
.session h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 12px; }
.card { max-width: 560px; margin: 0 auto 36px; }
.card dl { display: grid; grid-template-columns: auto 1fr; gap: 12px 18px; margin: 0 0 22px; align-items: center; }
.card dt { color: var(--muted); }
.card dd { margin: 0; overflow-wrap: anywhere; }
.card code { font-size: 1.1rem; color: var(--accent-strong); }
.card [data-countdown] { font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.copy { background: none; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); cursor: pointer; font-size: .8rem; padding: 2px 8px; margin-left: 6px; }
.copy:hover { color: var(--text); border-color: var(--accent); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions .button { flex: 1 1 200px; text-align: center; }

.foot { text-align: center; color: var(--muted); font-size: .85rem; padding: 24px 16px; border-top: 1px solid var(--border); }

/* Documentation */
.view-docs main { max-width: 1280px; }
.view-docs .top { max-width: 1280px; }
.docs { display: grid; grid-template-columns: 230px minmax(0, 1fr) 210px; gap: 44px; align-items: start; padding: 12px 0 24px; }
.docs-nav, .docs-toc { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; font-size: .92rem; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
/* The search box stays on top, only the page list scrolls (the results float over it) */
.docs-nav { display: flex; flex-direction: column; overflow: visible; }
.docs-nav__mobile { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.docs-nav summary { display: none; }
.docs-search { position: relative; z-index: 10; flex: none; margin-bottom: 8px; }
.docs-search__input { width: 100%; padding: 9px 34px 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; transition: border-color .15s ease, box-shadow .15s ease; }
.docs-search__input::placeholder { color: var(--muted); }
.docs-search__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(47, 191, 152, .2); }
.docs-search__input::-webkit-search-cancel-button { display: none; }
.docs-search__key { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); padding: 0 6px; border: 1px solid #35505c; border-bottom-width: 2px; border-radius: 5px; color: var(--muted); font: .78rem ui-monospace, Menlo, Consolas, monospace; pointer-events: none; }
.docs-search__input:focus + .docs-search__key, .docs-search__input:not(:placeholder-shown) + .docs-search__key { display: none; }
.docs-search__results { position: absolute; top: calc(100% + 6px); left: 0; width: min(440px, calc(100vw - 32px)); max-height: min(70vh, 560px); overflow-y: auto; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-soft); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.docs-search__results a { display: block; padding: 8px 10px; border: 0; border-radius: 8px; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.docs-search__results strong { display: block; margin-bottom: 2px; color: var(--text); font-weight: 600; }
.docs-search__results [aria-selected="true"] a, .docs-search__results a:hover { background: var(--surface-2); color: var(--text); }
.docs-search__results [aria-selected="true"] strong { color: var(--accent-strong); }
.docs-search__results mark { padding: 0 1px; border-radius: 3px; background: rgba(47, 191, 152, .25); color: var(--text); }
.docs-search__empty { padding: 10px; color: var(--muted); font-size: .88rem; }
.docs-nav__group { margin: 18px 0 6px; color: var(--text); font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.docs-nav ul, .docs-toc ul { list-style: none; margin: 0; padding: 0; }
.docs-nav a { display: block; padding: 5px 12px; border-left: 2px solid var(--border); color: var(--muted); text-decoration: none; transition: color .15s ease, border-color .15s ease, background-color .15s ease; }
.docs-nav a:hover { color: var(--text); border-left-color: #3a5361; }
.docs-nav a[aria-current] { color: var(--accent-strong); border-left-color: var(--accent); background: linear-gradient(90deg, rgba(47, 191, 152, .1), transparent); }
.docs-toc > p { margin: 18px 0 8px; color: var(--text); font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.docs-toc a { display: block; padding: 4px 0; color: var(--muted); text-decoration: none; line-height: 1.4; }
.docs-toc a:hover, .docs-toc a.is-active { color: var(--accent-strong); }
.docs-toc__cta { margin-top: 26px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.docs-toc__cta p { margin: 0 0 10px; color: var(--text); font-weight: 600; }
.docs-toc__cta .button { display: block; text-align: center; padding: 10px 14px; font-size: .92rem; color: var(--accent-ink); }
.docs-toc__cta .button:hover { color: var(--accent-ink); }
.docs-toc__cta .docs-toc__buy { margin-top: 10px; text-align: center; color: var(--accent); }

.docs-article { min-width: 0; max-width: 760px; color: #c9d6da; font-size: 1.02rem; line-height: 1.7; }
.docs-article__group { margin: 0 0 6px; color: var(--accent); font-size: .85rem; font-weight: 600; }
.docs-article h1 { margin: 0 0 12px; color: var(--text); font-size: clamp(2rem, 4vw, 2.6rem); line-height: 1.15; letter-spacing: -.02em; }
.docs-article .lead { max-width: none; margin-bottom: 30px; color: var(--muted); font-size: 1.15rem; }
.docs-article h2 { margin: 44px 0 14px; padding-top: 22px; border-top: 1px solid var(--border); color: var(--text); font-size: 1.45rem; letter-spacing: -.01em; scroll-margin-top: 20px; }
.docs-article h3 { margin: 28px 0 10px; color: var(--text); font-size: 1.12rem; scroll-margin-top: 20px; }
.docs-article a { color: var(--accent-strong); text-underline-offset: 3px; }
.docs-article strong { color: var(--text); }
.docs-article ul, .docs-article ol { padding-left: 1.3rem; }
.docs-article li { margin-bottom: 6px; }
.docs-article li::marker { color: var(--accent); }
.docs-article code { padding: 1px 6px; border-radius: 5px; background: var(--surface-2); color: #d9f5ec; font: .88em/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
.docs-article pre { margin: 16px 0 22px; padding: 16px 18px; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: #08100f; }
.docs-article pre code { padding: 0; background: none; color: #cfe3de; font-size: .86rem; line-height: 1.6; }
.docs-article kbd { padding: 1px 7px; border: 1px solid #35505c; border-bottom-width: 2px; border-radius: 5px; background: var(--surface); color: var(--text); font: .85em ui-monospace, Menlo, Consolas, monospace; }
.docs-article table { width: 100%; margin: 16px 0 24px; border-collapse: collapse; font-size: .93rem; display: block; overflow-x: auto; }
.docs-article th, .docs-article td { padding: 9px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.docs-article th { color: var(--text); font-weight: 600; background: var(--surface); }
.docs-article blockquote { margin: 16px 0; padding: 4px 18px; border-left: 3px solid var(--border); color: var(--muted); }
.callout { margin: 18px 0 22px; padding: 14px 18px; border: 1px solid var(--border); border-left-width: 4px; border-radius: 10px; background: var(--surface); }
.callout p:last-child { margin-bottom: 0; }
.callout p:first-child { margin-top: 0; }
.callout--tip { border-left-color: var(--accent); background: linear-gradient(90deg, rgba(47, 191, 152, .08), var(--surface) 60%); }
.callout--info { border-left-color: #5b9bd5; }
.callout--warn { border-left-color: #e0b341; background: linear-gradient(90deg, rgba(224, 179, 65, .08), var(--surface) 60%); }
.docs-pager { display: flex; gap: 14px; margin-top: 52px; padding-top: 24px; border-top: 1px solid var(--border); }
.docs-pager a { flex: 1; padding: 14px 18px; border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 600; transition: border-color .2s ease, transform .2s ease, background-color .2s ease; }
.docs-pager a:hover { border-color: var(--accent); background: var(--surface); transform: translateY(-2px); }
.docs-pager small { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; }
.docs-pager__next { text-align: right; margin-left: auto; }

@media (max-width: 1100px) {
    .docs { grid-template-columns: 220px minmax(0, 1fr); }
    .docs-toc { display: none; }
}
@media (max-width: 900px) {
    .docs { grid-template-columns: 1fr; gap: 20px; }
    .docs-nav { position: static; max-height: none; }
    .docs-search__results { width: 100%; }
    .docs-nav summary { display: block; cursor: pointer; padding: 12px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font-weight: 600; }
    .docs-nav__mobile[open] summary { margin-bottom: 6px; }
}

@media (max-width: 860px) {
    .tree { transform: rotateX(22deg) rotateZ(-2deg); }
    .hero { grid-template-columns: 1fr; padding-top: 16px; }
    .hero__art { order: -1; max-width: 520px; }
    .features { grid-template-columns: 1fr 1fr; }
    .showcase { padding-top: 24px; }
    .video__play { width: 68px; height: 68px; }
    .video__play svg { width: 30px; height: 30px; }
}
@media (max-width: 540px) {
    .features { grid-template-columns: 1fr; }
    .top-nav { margin-left: 0; width: 100%; }
    .top-nav a { padding: 6px 10px; }
    .by-digitalsky { padding-left: 0; border-left: 0; }
    .top-nav__promo { display: none; }
    .promo { align-items: flex-start; }
}

/* Language switcher */
.lang-switch { display: inline-flex; margin-left: 6px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; font-size: .8rem; font-weight: 600; }
.top-nav .lang-switch > * { padding: 4px 9px; border-radius: 999px; font-size: .8rem; line-height: 1.2; }
.lang-switch span[aria-current] { background: var(--surface-2); color: var(--text); }
.top-nav .lang-switch a { color: var(--muted); background: none; }
.top-nav .lang-switch a:hover { color: var(--accent); background: none; }
