/* Mouse Jiggler website — single stylesheet, no framework. Logical properties keep RTL (Arabic) working. */

:root {
  --bg: #ffffff;
  --bg-alt: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #f0f2f8;
  --text: #0f172a;
  --muted: #586174;
  --border: #e2e6ef;
  --accent: #4f46e5;
  --accent-2: #06b6d4;
  --accent-soft: #eef0ff;
  --accent-text: #4338ca;
  --on-accent: #ffffff;
  --success: #059669;
  --danger: #dc2626;
  --ring: 0 0 0 3px rgba(79, 70, 229, .35);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .18), 0 4px 10px -6px rgba(15, 23, 42, .08);
  --shadow-lg: 0 30px 60px -20px rgba(49, 46, 129, .35), 0 12px 24px -12px rgba(15, 23, 42, .18);
  --gradient: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  --header-bg: rgba(255, 255, 255, .78);
  --radius: 16px;
  --radius-sm: 10px;
  --container: 1160px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0a0f1e;
  --bg-alt: #0e1427;
  --surface: #121a2f;
  --surface-2: #19223b;
  --text: #e7eaf3;
  --muted: #9ba5bb;
  --border: #242d48;
  --accent: #6366f1;
  --accent-2: #22d3ee;
  --accent-soft: #1d2147;
  --accent-text: #a5b4fc;
  --success: #34d399;
  --danger: #f87171;
  --ring: 0 0 0 3px rgba(129, 140, 248, .45);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .04);
  --header-bg: rgba(10, 15, 30, .75);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0a0f1e; --bg-alt: #0e1427; --surface: #121a2f; --surface-2: #19223b; --text: #e7eaf3; --muted: #9ba5bb;
    --border: #242d48; --accent: #6366f1; --accent-2: #22d3ee; --accent-soft: #1d2147; --accent-text: #a5b4fc;
    --header-bg: rgba(10, 15, 30, .75); color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
:lang(ar) body, body:lang(ar) { font-family: "Segoe UI", "Noto Sans Arabic", Tahoma, var(--font); line-height: 1.8; }
:lang(zh-Hans) body, body:lang(zh-Hans) { font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Hiragino Sans GB", var(--font); }

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent-text); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .6em; font-weight: 750; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3, :lang(zh-Hans) h1, :lang(zh-Hans) h2, :lang(zh-Hans) h3 { letter-spacing: 0; }
h1 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code, kbd, pre { font-family: var(--mono); font-size: .9em; }
code { background: var(--surface-2); padding: .1em .4em; border-radius: 6px; overflow-wrap: anywhere; }
kbd {
  display: inline-block; padding: .05em .45em; border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 6px; background: var(--surface); font-size: .85em; line-height: 1.5;
}
.icon { width: 1.25em; height: 1.25em; flex: none; }
[dir="rtl"] .flip-rtl { transform: scaleX(-1); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.center { text-align: center; }
.center .hero-actions, .hero-actions.center { justify-content: center; }
.break { word-break: break-all; }

.skip-link { position: absolute; inset-inline-start: 1rem; top: -100px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: .6rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
main:focus { outline: none; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.narrow { max-width: 820px; }

/* Buttons */
.btn {
  --b-bg: var(--surface); --b-fg: var(--text); --b-bd: var(--border);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .7rem 1.2rem; border-radius: 12px; border: 1px solid var(--b-bd);
  background: var(--b-bg); color: var(--b-fg); font: inherit; font-weight: 650; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn-primary { --b-bg: var(--accent); --b-fg: var(--on-accent); --b-bd: transparent; background: var(--gradient); box-shadow: 0 8px 20px -8px rgba(79, 70, 229, .6); }
.btn-primary:hover { box-shadow: 0 14px 28px -10px rgba(79, 70, 229, .7); }
.btn-ghost { --b-bg: transparent; }
.btn-ghost:hover { --b-bg: var(--surface); }
.btn-sm { padding: .5rem .85rem; font-size: .92rem; border-radius: 10px; }
.btn-lg { padding: .9rem 1.5rem; font-size: 1.05rem; border-radius: 14px; }
.btn-download .icon { width: 1.5em; height: 1.5em; }
.btn-text { display: flex; flex-direction: column; align-items: flex-start; text-align: start; }
.btn-text small { font-weight: 500; font-size: .78rem; opacity: .9; margin-top: 2px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: var(--text); cursor: pointer; padding: 0;
  transition: background-color .2s, border-color .2s;
}
.icon-btn:hover { background: var(--surface-2); }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 650; text-decoration: none; }
.link-arrow .icon { width: 1.05em; height: 1.05em; transition: transform .2s var(--ease); }
.link-arrow:hover .icon:not(.flip-rtl) { transform: translateX(3px); }
.link-arrow:hover .icon.flip-rtl { transform: translateX(3px); }
[dir="rtl"] .link-arrow:hover .icon.flip-rtl { transform: scaleX(-1) translateX(3px); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--border); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; gap: 1rem; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 750; font-size: 1.1rem; color: var(--text); text-decoration: none; letter-spacing: -.01em; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.main-nav { margin-inline-start: auto; }
.main-nav ul { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; padding: .45rem .7rem; border-radius: 8px; color: var(--muted); text-decoration: none; font-weight: 550; font-size: .97rem; transition: color .2s, background-color .2s; }
.main-nav a:hover { color: var(--text); background: var(--surface-2); }
.main-nav a[aria-current="page"] { color: var(--accent-text); background: var(--accent-soft); }
.header-actions { display: flex; align-items: center; gap: .35rem; }
.nav-toggle { display: none; }

.lang-menu { position: relative; }
.lang-menu summary { list-style: none; display: inline-flex; align-items: center; gap: .3rem; height: 40px; padding-inline: .6rem; border-radius: 10px; cursor: pointer; color: var(--text); font-weight: 600; font-size: .85rem; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover { background: var(--surface-2); }
.lang-menu ul {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); min-width: 170px; margin: 0; padding: .35rem; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); z-index: 60;
  animation: pop .18s var(--ease);
}
.lang-menu a { display: block; padding: .5rem .75rem; border-radius: 8px; color: var(--text); text-decoration: none; }
.lang-menu a:hover { background: var(--surface-2); }
.lang-menu a[aria-current="true"] { color: var(--accent-text); font-weight: 650; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

.theme-toggle .icon { display: none; }
[data-theme-pref="light"] .theme-toggle .i-light, [data-theme-pref="dark"] .theme-toggle .i-dark, [data-theme-pref="auto"] .theme-toggle .i-auto { display: block; }
html:not(.js) .theme-toggle { display: none; }

@media (max-width: 1020px) {
  .nav-toggle { display: inline-grid; }
  .header-cta span { display: none; }
  .main-nav {
    position: fixed; inset: 68px 0 auto 0; margin: 0; padding: .75rem 20px 1.25rem;
    background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s var(--ease), visibility .2s;
  }
  .main-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: .75rem .8rem; font-size: 1.05rem; }
  html:not(.js) .main-nav { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; }
  .header-actions { margin-inline-start: auto; }
}
@media (max-width: 420px) { .brand span { display: none; } }

/* Sections */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-tight { padding-block: clamp(32px, 5vw, 56px); }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.section-head p, .section-lead { color: var(--muted); font-size: 1.15rem; }
.page-hero { padding-block: clamp(48px, 7vw, 88px) clamp(16px, 3vw, 32px); position: relative; }
.page-hero h1 { margin-bottom: .4em; }

/* Hero */
.hero { position: relative; overflow: hidden; padding-block: clamp(48px, 7vw, 96px) clamp(56px, 8vw, 104px); }
.hero-bg {
  position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 40% at 75% 35%, rgba(99, 102, 241, .22), transparent 70%),
    radial-gradient(35% 35% at 90% 70%, rgba(6, 182, 212, .18), transparent 70%),
    radial-gradient(30% 30% at 15% 10%, rgba(99, 102, 241, .10), transparent 70%);
}
[dir="rtl"] .hero-bg { transform: scaleX(-1); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .8rem; margin-bottom: 1.25rem;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font-size: .88rem; font-weight: 600; box-shadow: var(--shadow-sm);
}
.eyebrow .icon { color: var(--accent); width: 1.05em; height: 1.05em; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); margin-bottom: .25em; }
.hero h1 span { display: block; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .08em; }
.slogan { font-size: clamp(1.2rem, 2.2vw, 1.5rem); font-weight: 650; margin-bottom: .6em; }
.lead { color: var(--muted); font-size: 1.15rem; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-block: 1.75rem 1.5rem; }
.hero-facts { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: .95rem; }
.hero-facts li { display: inline-flex; align-items: center; gap: .4rem; }
.hero-facts .icon, .checklist .icon { color: var(--success); width: 1.1em; height: 1.1em; }
.hero-visual { position: relative; justify-self: center; }
.device {
  margin: 0; width: min(340px, 78vw); border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid var(--border); background: var(--surface);
  animation: float 7s ease-in-out infinite;
}
.device img { width: 100%; }
.hero-badge {
  position: absolute; inset-inline-start: -28px; bottom: 18%;
  display: inline-flex; align-items: center; gap: .55rem; padding: .6rem .95rem; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: .88rem; font-weight: 600;
  animation: float 7s ease-in-out infinite reverse;
}
.pulse { width: 10px; height: 10px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 0 rgba(16, 185, 129, .6); animation: pulse 2s infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); } 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); } }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-actions, .hero-facts { justify-content: center; }
  .lead { margin-inline: auto; }
  .hero-badge { inset-inline-start: -10px; }
}

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; list-style: none; padding: 0; margin: 0 0 2rem; }
.cards-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.card {
  position: relative; padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.card-flat:hover { transform: none; }
.card h3, .card h2 { font-size: 1.15rem; margin-bottom: .4em; }
.card p { color: var(--muted); margin-bottom: .75em; }
.card p:last-child { margin-bottom: 0; }
.card-icon {
  display: inline-grid; place-items: center; width: 46px; height: 46px; margin-bottom: 14px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent-text);
}
.card-icon .icon { width: 24px; height: 24px; }

/* Steps & modes */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; list-style: none; padding: 0; margin: 0 0 3rem; counter-reset: none; }
.step { position: relative; padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.step p { color: var(--muted); margin: 0; }
.step-num {
  display: inline-grid; place-items: center; width: 38px; height: 38px; margin-bottom: 14px; border-radius: 50%;
  background: var(--gradient); color: #fff; font-weight: 750;
}
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; }
.mode { display: flex; gap: 20px; align-items: center; padding: 24px; border-radius: var(--radius); background: var(--bg-alt); border: 1px solid var(--border); }
.mode p { color: var(--muted); margin: 0; }
.mode-demo {
  position: relative; flex: none; width: 96px; height: 96px; border-radius: 20px;
  background: radial-gradient(circle at 50% 50%, var(--accent-soft), transparent 70%), var(--surface); border: 1px solid var(--border);
}
.mode-demo .cursor { position: absolute; top: 28px; inset-inline-start: 30px; color: var(--text); }
.mode-demo .icon { width: 38px; height: 38px; }
.mode-classic .cursor { animation: jiggle 3s var(--ease) infinite; }
.mode-zen::after { content: ""; position: absolute; inset: 22px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: ripple 3s ease-out infinite; }
@keyframes jiggle { 0%, 70%, 100% { transform: translate(0, 0); } 75% { transform: translate(8px, 8px); } 80% { transform: translate(0, 0); } }
@keyframes ripple { 0%, 60% { opacity: 0; transform: scale(.6); } 70% { opacity: .9; } 100% { opacity: 0; transform: scale(1.2); } }

/* Lists */
.checklist { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 16px; }
.checklist li { display: flex; gap: .8rem; align-items: flex-start; }
.checklist .icon { margin-top: .3em; }
.checklist strong { display: block; }
.checklist span { color: var(--muted); }
.checklist.compact { gap: 10px; }
.checklist.compact span { color: inherit; }
.bullets { padding-inline-start: 1.25rem; }
.bullets li { margin-bottom: .6rem; }
.bullets li::marker { color: var(--accent); }
.note {
  display: flex; gap: .75rem; align-items: flex-start; max-width: 860px; margin: 1rem auto 0; padding: 16px 20px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: .96rem;
}
.note .icon { color: var(--accent); margin-top: .2em; }

/* Split layout */
.split { display: grid; grid-template-columns: 1fr minmax(260px, 360px); gap: clamp(32px, 6vw, 80px); align-items: center; }
.split > * { min-width: 0; }
.split-reverse > :first-child { order: 2; }
.split-single { grid-template-columns: 1fr; max-width: 820px; }
.split-top { align-items: start; grid-template-columns: 1fr 1fr; }
.split-visual { margin: 0; justify-self: center; }
.split-visual img, .inline-shot img { border-radius: 14px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.split-visual figcaption, .inline-shot figcaption { text-align: center; color: var(--muted); font-size: .9rem; margin-top: .75rem; }
@media (max-width: 880px) { .split, .split-top { grid-template-columns: 1fr; } .split-reverse > :first-child { order: 0; } .split-visual { max-width: 340px; } }

/* Gallery & lightbox */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px; list-style: none; padding: 0; margin: 0; }
.gallery figure { margin: 0; }
.gallery-link { position: relative; display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease); }
.gallery-link img { width: 100%; aspect-ratio: 386 / 520; object-fit: cover; object-position: top; transition: transform .5s var(--ease); }
.gallery-link:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.gallery-link:hover img { transform: scale(1.03); }
.zoom {
  position: absolute; inset-inline-end: 10px; bottom: 10px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: rgba(15, 23, 42, .72); color: #fff; opacity: 0; transform: scale(.9); transition: opacity .2s, transform .2s;
}
.gallery-link:hover .zoom, .gallery-link:focus-visible .zoom { opacity: 1; transform: none; }
.gallery figcaption { margin-top: .6rem; font-size: .92rem; color: var(--muted); text-align: center; }
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: transparent; color: #fff; overflow: hidden;
}
.lightbox[open] { display: grid; grid-template-columns: auto 1fr auto; align-items: center; animation: fade .2s ease; }
.lightbox::backdrop { background: rgba(5, 8, 20, .86); backdrop-filter: blur(4px); }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; height: 100%; padding: 56px 8px 24px; }
.lightbox img { max-height: calc(100vh - 140px); width: auto; border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.lightbox figcaption { margin-top: 1rem; text-align: center; color: #e2e8f0; }
.lightbox .icon-btn { color: #fff; background: rgba(255, 255, 255, .1); width: 48px; height: 48px; margin: 12px; }
.lightbox .icon-btn:hover { background: rgba(255, 255, 255, .2); }
.lb-close { position: absolute; top: 4px; inset-inline-end: 4px; z-index: 2; }
[dir="rtl"] .lb-prev .icon, [dir="rtl"] .lb-next .icon { transform: scaleX(-1); }
@keyframes fade { from { opacity: 0; } }
@media (max-width: 600px) { .lightbox .lb-prev, .lightbox .lb-next { position: absolute; bottom: 8px; } .lb-prev { inset-inline-start: 8px; } .lb-next { inset-inline-end: 8px; } .lightbox[open] { grid-template-columns: 1fr; } }

/* FAQ */
.faq-list { display: grid; gap: 12px; margin-bottom: 1.5rem; }
.faq-list details { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.faq-list details[open] { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); box-shadow: var(--shadow-sm); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 18px 22px; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary h2, .faq-list summary h3 { font-size: 1.07rem; margin: 0; font-weight: 650; letter-spacing: 0; }
.faq-icon { color: var(--accent); transition: transform .25s var(--ease); }
details[open] .faq-icon { transform: rotate(45deg); }
.faq-answer { padding: 0 22px 18px; color: var(--muted); }
.faq-answer p { margin: 0; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); margin-bottom: 1rem; }
table { width: 100%; border-collapse: collapse; font-size: .97rem; }
th, td { padding: 12px 16px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--border); }
thead th { background: var(--surface-2); font-weight: 650; font-size: .92rem; }
tbody tr:last-child > * { border-bottom: 0; }
.compare-table table { min-width: 860px; }
.compare-table tbody th { font-weight: 600; width: 22%; }
.compare-table .ours { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.compare-table thead .ours { color: var(--accent-text); }
.tool { padding-block: 1rem; border-bottom: 1px solid var(--border); }
.tool:last-child { border-bottom: 0; }
.tool p { color: var(--muted); }
.tool strong { color: var(--text); }

/* Code */
pre.code { background: #0f172a; color: #e2e8f0; padding: 16px 18px; border-radius: var(--radius-sm); overflow-x: auto; margin: 0 0 1.25rem; text-align: left; }
pre.code code { background: none; padding: 0; color: inherit; overflow-wrap: normal; }
.hashes { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: 10px; text-align: left; }
.hashes li { display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--border); }
.hashes span { font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }
.hashes code { font-size: .8rem; word-break: break-all; background: none; padding: 0; color: var(--muted); }

/* TOC */
.toc-inline ul { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.toc-inline a { display: inline-block; padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); text-decoration: none; font-size: .9rem; }
.toc-inline a:hover { color: var(--accent-text); border-color: var(--accent); }

/* Guide */
.guide-layout { display: grid; grid-template-columns: 240px 1fr; gap: 48px; padding-block: 24px 72px; align-items: start; }
.guide-aside { position: sticky; top: 92px; }
.toc-title { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.guide-aside ol { list-style: none; padding: 0; margin: 0; border-inline-start: 2px solid var(--border); }
.guide-aside a { display: block; padding: .35rem 1rem; margin-inline-start: -2px; border-inline-start: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: .95rem; }
.guide-aside a:hover, .guide-aside a.is-active { color: var(--accent-text); border-color: var(--accent); }
.guide-step { display: grid; grid-template-columns: 38px 1fr; gap: 20px; padding-bottom: 40px; margin-bottom: 40px; border-bottom: 1px solid var(--border); }
.guide-step:last-child { border-bottom: 0; }
.inline-shot { margin: 1.5rem 0 0; max-width: 320px; }
@media (max-width: 880px) { .guide-layout { grid-template-columns: 1fr; } .guide-aside { position: static; } }

/* Prose */
.prose { font-size: 1.06rem; }
.prose h2 { margin-top: 1.8em; font-size: clamp(1.4rem, 2.4vw, 1.75rem); }
.prose h2:first-child, .guide-step .prose h2 { margin-top: 0; }
.prose h3 { margin-top: 1.5em; }
.prose ul, .prose ol { padding-inline-start: 1.3rem; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--accent); }
.prose table { margin-bottom: 1.25rem; border: 1px solid var(--border); }
.prose blockquote { margin: 0 0 1.2em; padding: 12px 18px; border-inline-start: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; }
[dir="rtl"] .prose blockquote { border-radius: 10px 0 0 10px; }
.article-body { padding-bottom: 72px; }
.article-cta { margin-top: 3rem; padding: 28px; border-radius: var(--radius); background: var(--bg-alt); border: 1px solid var(--border); text-align: center; }
.article-cta h2 { margin-top: 0; }
.post-meta { color: var(--muted); font-size: .92rem; }
.post h2 { font-size: 1.3rem; }
.post h2 a, .post h3 a { color: var(--text); text-decoration: none; }
.post h2 a::after, .post h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.post h2 a:hover, .post h3 a:hover { color: var(--accent-text); }

/* Breadcrumb */
.breadcrumb ol { display: flex; flex-wrap: wrap; justify-content: inherit; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1.25rem; font-size: .9rem; color: var(--muted); }
.center .breadcrumb ol { justify-content: center; }
.breadcrumb li + li::before { content: "/"; margin-inline-end: .4rem; opacity: .6; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-text); }

/* Download */
.download-main {
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px 40px; align-items: center; padding: clamp(24px, 4vw, 40px);
  border-radius: 22px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
  position: relative; overflow: hidden;
}
.download-main::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--gradient); }
.download-info { display: flex; gap: 20px; align-items: flex-start; }
.download-logo { border-radius: 16px; flex: none; }
.download-info h2 { font-size: 1.5rem; }
.download-info p { color: var(--muted); margin: 0; }
.download-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .75rem; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 20px; margin: 0; }
.facts div { padding: 12px 14px; border-radius: 12px; background: var(--bg-alt); }
.facts dt { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 650; }
.facts dd { margin: 2px 0 0; font-weight: 650; }
@media (max-width: 880px) { .download-main { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; } .download-info { flex-direction: column; } }

/* Final CTA */
.final-cta { padding-top: 0; }
.section-alt + .final-cta, .final-cta:first-child { padding-top: clamp(64px, 9vw, 112px); }
.cta-box {
  position: relative; overflow: hidden; text-align: center; padding: clamp(36px, 6vw, 64px) 24px; border-radius: 28px;
  background: radial-gradient(60% 80% at 50% 0%, rgba(99, 102, 241, .35), transparent 70%), #0f1530; color: #fff;
}
.cta-box h2 { color: #fff; }
.cta-box p { color: #c7cde0; max-width: 560px; margin-inline: auto; }
.cta-box .btn-download { margin-block: .75rem 1.25rem; }
.cta-box a:not(.btn) { color: #a5b4fc; }

/* Forms */
.contact-layout { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
.contact-aside { display: grid; gap: 20px; }
.contact-aside h2 { font-size: 1.1rem; }
@media (max-width: 880px) { .contact-layout { grid-template-columns: 1fr; } }
.contact-form { display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; margin-bottom: .35rem; font-size: .96rem; }
.field input, .field textarea {
  width: 100%; padding: .75rem .9rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font: inherit; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 160px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.field.has-error input, .field.has-error textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .88rem; margin: .35rem 0 0; }
.hp { position: absolute !important; inset-inline-start: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-form .btn { justify-self: start; }
.alert { display: flex; gap: .8rem; align-items: flex-start; padding: 16px 18px; border-radius: 12px; margin-bottom: 20px; border: 1px solid; }
.alert p { margin: 0; }
.alert h2 { font-size: 1.1rem; margin-bottom: .25rem; }
.alert .icon { margin-top: .15em; }
.alert-success { background: color-mix(in srgb, var(--success) 10%, var(--surface)); border-color: color-mix(in srgb, var(--success) 40%, transparent); }
.alert-success .icon { color: var(--success); }
.alert-error { background: color-mix(in srgb, var(--danger) 8%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.alert-error .icon { color: var(--danger); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-alt); padding-top: 56px; font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand p { color: var(--muted); max-width: 320px; margin-top: .75rem; }
.footer-title { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 .8rem; font-weight: 700; }
.site-footer nav ul { list-style: none; padding: 0; margin: 0 0 1.25rem; display: grid; gap: .45rem; }
.site-footer nav a { color: var(--text); text-decoration: none; }
.site-footer nav a:hover { color: var(--accent-text); }
.footer-langs { grid-template-columns: 1fr 1fr; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-block: 24px; margin-top: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: .88rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 880px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* Consent & language suggestion */
.consent, .lang-suggest {
  position: fixed; z-index: 70; inset-inline: 16px; bottom: 16px; max-width: 560px; margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 16px 18px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); animation: rise .35s var(--ease);
}
.consent p, .lang-suggest p { margin: 0; flex: 1 1 260px; font-size: .94rem; }
.consent-actions { display: flex; gap: .5rem; }
.lang-suggest { bottom: auto; top: 80px; max-width: 460px; }
@media (max-width: 720px) { .lang-suggest { top: auto; bottom: 16px; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }

/* 404 */
.big-code { font-size: clamp(5rem, 16vw, 9rem); font-weight: 800; line-height: 1; margin: 0; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
.cards > .reveal:nth-child(3n+2), .steps > .reveal:nth-child(2), .gallery > .reveal:nth-child(3n+2) { transition-delay: .08s; }
.cards > .reveal:nth-child(3n), .steps > .reveal:nth-child(3), .gallery > .reveal:nth-child(3n) { transition-delay: .16s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .consent, .lang-suggest, .cta-box, .hero-badge { display: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Admin */
.admin { background: var(--bg-alt); }
.admin-main { max-width: 1180px; margin: 0 auto; padding: 32px 20px 64px; }
.admin-card { max-width: 420px; margin: 8vh auto 0; padding: 32px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.admin-wide { max-width: 680px; }
.admin-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 1.25rem; }
.admin-brand img { border-radius: 10px; }
.admin-brand h1 { font-size: 1.5rem; margin: 0; }
.admin-brand p { margin: 0; }
.admin-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.admin-actions { display: flex; gap: .5rem; align-items: center; }
.admin-actions form { margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; list-style: none; padding: 0; margin: 0 0 12px; }
.kpi { padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.kpi strong { display: block; font-size: 2rem; line-height: 1.15; letter-spacing: -.02em; }
.kpi-label { font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; }
.kpi-hint { font-size: .85rem; color: var(--muted); }
.kpis .kpi:first-child { background: var(--gradient); color: #fff; border: 0; }
.kpis .kpi:first-child .kpi-label, .kpis .kpi:first-child .kpi-hint { color: rgba(255, 255, 255, .85); }
.admin-panel { padding: 20px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); margin-top: 18px; min-width: 0; }
.admin-panel h2 { font-size: 1.05rem; margin-bottom: 12px; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.admin-grid > .admin-panel { margin-top: 18px; }
.admin-grid-3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
@media (max-width: 800px) { .admin-grid { grid-template-columns: 1fr; } }
.chart { display: block; width: 100%; height: auto; }
.chart rect { fill: var(--accent); }
.chart rect:hover { fill: var(--accent-2); }
.chart .grid { stroke: var(--border); stroke-dasharray: 3 4; }
.chart text { fill: var(--muted); font-size: 11px; text-anchor: middle; font-family: var(--font); }
.chart text.max { text-anchor: start; }
.chart text.v { fill: var(--text); font-weight: 600; font-size: 10px; }
table.mini { font-size: .9rem; }
table.mini th, table.mini td { padding: 7px 10px; }
table.mini td:not(:first-child), table.mini th:not(:first-child) { text-align: end; font-variant-numeric: tabular-nums; }
.messages { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.messages details { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; }
.messages summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-items: baseline; }
.msg-date { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .88rem; }
.msg-body { margin-top: 10px; padding: 12px; background: var(--bg-alt); border-radius: 8px; white-space: normal; overflow-wrap: anywhere; }
.tag { font-size: .75rem; padding: .1rem .5rem; border-radius: 999px; }
.tag-warn { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
