:root {
    --primary-color: #ef4444;   /* rose */
    --secondary-color: #fb7185; /* coral */
    --grad: linear-gradient(135deg, #ef4444, #fb7185);
    --teal: #0f766e;
    --amber: #f59e0b;
    --success-color: #10b981;
    --text-primary: #111827;   /* ink */
    --text-secondary: #536174; /* muted */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f6f9;
    --card: #ffffff;
    --border-color: #e5e7eb;   /* line */
    --shadow: 0 2px 15px rgba(17, 24, 39, 0.06);
    --shadow-lg: 0 18px 50px rgba(17, 24, 39, 0.13);
    --nav-bg: rgba(255, 255, 255, 0.78);
    --chip-bg: rgba(239, 68, 68, 0.09);
    --radius: 20px;
}

:root[data-theme="dark"] {
    --text-primary: #f4f5fa;
    --text-secondary: #9aa1ad;
    --bg-primary: #0d0f14;
    --bg-secondary: #14161d;
    --card: #191c23;
    --border-color: #272b34;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.42);
    --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.55);
    --nav-bg: rgba(13, 15, 20, 0.72);
    --chip-bg: rgba(251, 113, 133, 0.16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Roboto, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background-color .4s ease, color .4s ease;
}

html { scroll-behavior: smooth; scroll-padding-top: 90px; overflow-x: clip; }
img { display: block; max-width: 100%; }

a:focus-visible, button:focus-visible, summary:focus-visible {
    outline: 3px solid rgba(239, 68, 68, 0.45);
    outline-offset: 3px;
    border-radius: 6px;
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 2000;
    background: var(--primary-color); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 0;
}
.skip-link:focus { left: 0; }

.section-title { font-size: clamp(28px, 4vw, 38px); font-weight: 850; text-align: center; letter-spacing: -0.02em; }
.section-sub { text-align: center; color: var(--text-secondary); font-size: 17px; margin-top: 12px; margin-bottom: 52px; }

/* ---------- Navbar ---------- */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: var(--nav-bg);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid transparent;
    padding: 12px 0;
    transition: border-color .3s, box-shadow .3s, background .4s;
}
.navbar.scrolled { border-bottom-color: var(--border-color); box-shadow: 0 6px 24px rgba(17,24,39,.06); }
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.nav-brand { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 850; text-decoration: none; color: var(--text-primary); }
.brand-name { white-space: nowrap; }
.brand-icon { display: inline-flex; }
.brand-icon img { display: block; width: 36px; height: 36px; border-radius: 10px; box-shadow: 0 4px 12px rgba(239,68,68,.25); }
.nav-menu { display: flex; align-items: center; gap: 22px; }
.nav-link { text-decoration: none; color: var(--text-secondary); font-weight: 600; font-size: 15px; transition: color .25s; }
.nav-link:hover { color: var(--primary-color); }
.icon-btn, .lang-switch {
    background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border-color);
    border-radius: 999px; cursor: pointer; font-weight: 700; transition: all .25s; display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn { width: 38px; height: 38px; }
.lang-switch { padding: 8px 15px; font-size: 14px; }
.icon-btn:hover, .lang-switch:hover { border-color: var(--primary-color); color: var(--primary-color); }
.icon-btn .i-moon { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-moon { display: block; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 26px; border-radius: 12px; text-decoration: none; font-weight: 800; font-size: 16px; transition: transform .2s, box-shadow .2s, background .25s; white-space: nowrap; }
.btn-sm { padding: 9px 18px; font-size: 14px; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(239,68,68,.32); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(239,68,68,.42); }
.btn-secondary { background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border-color); }
.btn-secondary:hover { transform: translateY(-2px); border-color: var(--primary-color); color: var(--primary-color); }
.nav-cta { box-shadow: 0 6px 16px rgba(239,68,68,.3); }

/* App Store badge (inline SVG) */
.appstore-badge { display: inline-flex; border-radius: 10px; overflow: hidden; transition: transform .2s, box-shadow .2s; box-shadow: 0 8px 22px rgba(0,0,0,.22); }
.appstore-badge:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,0,0,.3); }
.appstore-badge svg { display: block; height: 52px; width: auto; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 140px 0 90px; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; background:
    radial-gradient(58% 52% at 84% 6%, rgba(251,113,133,.24), transparent 60%),
    radial-gradient(52% 48% at 6% 26%, rgba(239,68,68,.18), transparent 60%),
    radial-gradient(46% 44% at 60% 92%, rgba(15,118,110,.12), transparent 60%); }
.hero .container { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-block; font-size: 13px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-color); background: var(--chip-bg); padding: 7px 14px; border-radius: 999px; margin-bottom: 20px; }
.hero-title { font-size: clamp(38px, 5.4vw, 60px); font-weight: 850; line-height: 1.06; letter-spacing: -0.03em; margin-bottom: 18px; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; text-wrap: balance; }
.hero-subtitle { font-size: 19px; color: var(--text-secondary); margin-bottom: 34px; max-width: 40ch; }
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-trust { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 30px; }
.hero-trust li { font-size: 14px; color: var(--text-secondary); font-weight: 600; display: inline-flex; align-items: center; gap: 7px; }
.hero-trust svg { color: var(--primary-color); }

/* Hero device — real screenshot in CSS iPhone frame */
.hero-visual { position: relative; display: flex; justify-content: center; }
.device {
    position: relative; width: 300px; max-width: 78vw;
    background: linear-gradient(160deg, #23252c, #0b0c0f);
    border-radius: 46px; padding: 12px;
    box-shadow: var(--shadow-lg), inset 0 0 0 2px rgba(255,255,255,.06);
    animation: drift 7s ease-in-out infinite;
}
.device::before { content: ""; position: absolute; top: 14px; left: 50%; transform: translateX(-50%); width: 116px; height: 26px; background: #000; border-radius: 999px; z-index: 3; }
.device-screen { position: relative; border-radius: 36px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.device-screen img { width: 100%; height: auto; display: block; border-radius: 36px; }
.hero-chip { position: absolute; z-index: 4; background: var(--card); border: 1px solid var(--border-color); box-shadow: var(--shadow-lg); border-radius: 14px; padding: 10px 14px; font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; gap: 8px; }
.hero-chip .chip-ic { width: 26px; height: 26px; border-radius: 8px; display: inline-grid; place-items: center; color: #fff; flex: none; }
.chip-a { top: 16%; left: -8%; animation: float 5s ease-in-out infinite; }
.chip-a .chip-ic { background: linear-gradient(135deg,#10b981,#0f766e); }
.chip-b { bottom: 14%; right: -6%; animation: float 5s ease-in-out infinite .9s; }
.chip-b .chip-ic { background: var(--grad); }
.chip-strong { display: block; font-size: 13px; }
.chip-sub { display: block; font-size: 10.5px; font-weight: 600; color: var(--text-secondary); }

@keyframes drift { 0%,100% { transform: translateY(0) rotate(0deg); } 50% { transform: translateY(-12px) rotate(-.6deg); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* ---------- Proof band ---------- */
.proof { padding: 22px 0; border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); background: var(--bg-secondary); }
.proof-row { display: flex; align-items: center; justify-content: space-between; gap: 26px; flex-wrap: wrap; }
.proof-rating { display: flex; align-items: center; gap: 12px; }
.proof-badge { display: grid; place-items: center; min-height: 35px; color: var(--text-primary); }
.proof-badge svg { display: block; }
.proof-sub { display: flex; flex-direction: column; line-height: 1.25; font-size: 13px; color: var(--text-secondary); }
.proof-sub strong { color: var(--text-primary); font-size: 15px; }
.proof-stats { display: flex; gap: 34px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 20px; font-weight: 850; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat span { font-size: 12.5px; color: var(--text-secondary); }

/* ---------- Sections base ---------- */
.how, .features, .screenshots, .privacy, .faq { padding: 88px 0; }
.features { background: var(--bg-secondary); }
.faq { background: var(--bg-secondary); }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.step { position: relative; background: var(--card); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 34px 26px; text-align: left; box-shadow: var(--shadow); }
.step-badge { position: absolute; top: -16px; left: 26px; width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff; font-weight: 850; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(239,68,68,.35); }
.step-ic { width: 52px; height: 52px; border-radius: 15px; background: var(--chip-bg); color: var(--primary-color); display: grid; place-items: center; margin: 8px 0 16px; }
.step h3 { font-size: 20px; margin-bottom: 8px; font-weight: 800; }
.step p { color: var(--text-secondary); font-size: 15px; }
.steps .step:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -18px; width: 20px; height: 2px; background: var(--border-color); }

/* Features */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.feature-card { background: var(--card); border: 1px solid var(--border-color); padding: 32px; border-radius: var(--radius); transition: transform .3s, box-shadow .3s, border-color .3s; }
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feature-icon { width: 54px; height: 54px; border-radius: 15px; background: var(--chip-bg); color: var(--primary-color); display: grid; place-items: center; margin-bottom: 20px; transition: background .3s, color .3s; }
.feature-card:hover .feature-icon { background: var(--grad); color: #fff; }
.feature-card h3 { font-size: 20px; margin-bottom: 10px; font-weight: 800; }
.feature-card p { color: var(--text-secondary); font-size: 15px; }

/* ---------- Screenshots gallery ---------- */
.gallery { position: relative; }
.gal-track { display: flex; gap: 30px; overflow-x: auto; padding: 10px 4px 24px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gal-track::-webkit-scrollbar { display: none; }
.shot { flex: 0 0 auto; scroll-snap-align: center; text-align: center; }
.phone { position: relative; width: 258px; max-width: 70vw; border-radius: 40px; padding: 11px; background: linear-gradient(160deg, #23252c, #0b0c0f); box-shadow: var(--shadow-lg); cursor: zoom-in; }
.phone::before { content: ""; position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 96px; height: 22px; background: #000; border-radius: 999px; z-index: 2; }
.phone img { width: 100%; height: auto; border-radius: 30px; display: block; }
.shot figcaption { margin-top: 16px; font-weight: 700; color: var(--text-secondary); font-size: 15px; }
.gal-arrow { position: absolute; top: 42%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--border-color); background: var(--card); color: var(--text-primary); font-size: 24px; line-height: 1; cursor: pointer; box-shadow: var(--shadow); z-index: 2; transition: all .2s; }
.gal-arrow:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }
.gal-arrow.prev { left: -8px; } .gal-arrow.next { right: -8px; }
.gal-dots { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
.gal-dots button { width: 8px; height: 8px; border-radius: 999px; border: none; background: var(--border-color); cursor: pointer; padding: 0; transition: all .25s; }
.gal-dots button.active { width: 24px; background: var(--primary-color); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(0,0,0,.86); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .25s; padding: 24px; }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lightbox-close { position: absolute; top: 20px; right: 24px; width: 44px; height: 44px; border-radius: 50%; border: none; background: rgba(255,255,255,.14); color: #fff; font-size: 24px; cursor: pointer; }

/* ---------- Privacy ---------- */
.privacy-card { background: var(--grad); color: #fff; border-radius: 28px; padding: 48px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 30px; align-items: center; box-shadow: 0 24px 60px rgba(239,68,68,.3); }
.privacy-lead h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 850; margin-bottom: 12px; }
.privacy-lead p { opacity: .94; font-size: 16px; }
.privacy-points { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.privacy-points li { display: flex; align-items: center; gap: 10px; font-weight: 700; background: rgba(255,255,255,.15); padding: 12px 14px; border-radius: 14px; font-size: 15px; }
.privacy-points svg { flex: none; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--card); border: 1px solid var(--border-color); border-radius: 16px; padding: 4px 20px; }
.faq-item summary { list-style: none; cursor: pointer; font-weight: 700; font-size: 17px; padding: 16px 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 24px; font-weight: 400; color: var(--primary-color); transition: transform .25s; flex: none; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--text-secondary); padding: 0 0 18px; font-size: 15px; }

/* ---------- Download ---------- */
.download { padding: 96px 0; background: var(--grad); color: #fff; text-align: center; }
.download-content h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 850; margin-bottom: 14px; }
.download-content p { font-size: 19px; margin-bottom: 32px; opacity: .94; }
.download-buttons { display: flex; justify-content: center; }
.download .appstore-badge { box-shadow: 0 14px 34px rgba(0,0,0,.32); }
.download-note { font-size: 14px; opacity: .85; margin-top: 18px; }

/* ---------- Footer ---------- */
.footer { padding: 44px 0; background: var(--bg-secondary); border-top: 1px solid var(--border-color); color: var(--text-secondary); text-align: center; }
.footer-content p { margin: 5px 0; font-size: 14px; }
.footer a { color: var(--primary-color); text-decoration: none; }
.footer a:hover { text-decoration: underline; }

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 900; display: none; align-items: center; justify-content: space-between; gap: 12px; background: var(--nav-bg); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--border-color); border-radius: 18px; padding: 10px 12px; box-shadow: var(--shadow-lg); transform: translateY(140%); transition: transform .35s; }
.sticky-cta.show { transform: translateY(0); }
.sticky-app { display: flex; align-items: center; gap: 10px; }
.sticky-app img { width: 34px; height: 34px; border-radius: 9px; }
.sticky-txt { display: flex; flex-direction: column; line-height: 1.2; }
.sticky-txt strong { font-size: 15px; }
.sticky-txt span { font-size: 12px; color: var(--text-secondary); }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s ease-out, transform .6s ease-out; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .steps { grid-template-columns: 1fr; gap: 30px; }
    .steps .step:not(:last-child)::after { display: none; }
    .privacy-card { grid-template-columns: 1fr; padding: 36px; }
}
@media (max-width: 820px) {
    .nav-menu .nav-link { display: none; }
    .hero .container { grid-template-columns: 1fr; gap: 44px; text-align: center; }
    .hero-content { display: flex; flex-direction: column; align-items: center; }
    .hero-subtitle { max-width: 44ch; }
    .hero-buttons, .hero-trust { justify-content: center; }
    .hero-visual { order: -1; }
    .chip-a { left: 2%; } .chip-b { right: 2%; }
    .proof-row { justify-content: center; text-align: center; }
    .sticky-cta { display: flex; }
}
@media (max-width: 560px) {
    .hero-chip { display: none; }
    .nav-brand { font-size: 17px; gap: 8px; }
    .brand-icon img { width: 32px; height: 32px; }
}
@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero { padding: 120px 0 60px; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons .btn, .hero-buttons .appstore-badge { width: 100%; }
    .hero-buttons .appstore-badge svg { width: 100%; }
    .proof-stats { gap: 18px 24px; }
    .feature-card { padding: 26px; }
    .privacy-points { grid-template-columns: 1fr; }
    .gal-arrow { display: none; }
}

/* ---------- Section eyebrows + scroll progress ---------- */
.section-eyebrow { text-align: center; }
.scroll-progress {
    position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
    background: var(--grad);
    transform: scaleX(var(--p, 0)); transform-origin: 0 50%;
    pointer-events: none;
}

/* ---------- Try-it interactive demo ---------- */
.trydemo, .personas, .method, .compare { padding: 88px 0; }
.method { background: var(--bg-secondary); }
.demo-panel {
    display: grid; grid-template-columns: 1fr 1.2fr; gap: 34px;
    background: var(--card); border: 1px solid var(--border-color);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px;
    max-width: 1020px; margin: 0 auto;
}
.demo-h { font-size: 15px; font-weight: 800; margin-bottom: 14px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .06em; }
.demo-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.demo-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px;
    border-radius: 12px; border: 1px solid var(--border-color); background: var(--bg-secondary);
    color: var(--text-primary); font-weight: 700; font-size: 14px; font-family: inherit; cursor: pointer;
    transition: transform .15s, border-color .2s, box-shadow .2s;
}
.demo-chip:hover { transform: translateY(-2px); border-color: var(--primary-color); box-shadow: var(--shadow); }
.demo-chip:active { transform: scale(.96); }
.demo-chip-amt { color: var(--primary-color); font-weight: 800; }
.demo-chip.income .demo-chip-amt { color: var(--success-color); }
.demo-undo {
    display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; padding: 9px 16px;
    border-radius: 999px; border: 1px solid var(--border-color); background: transparent;
    color: var(--text-secondary); font-weight: 700; font-size: 13.5px; font-family: inherit; cursor: pointer;
    transition: color .2s, border-color .2s, opacity .2s;
}
.demo-undo:hover:not(:disabled) { color: var(--primary-color); border-color: var(--primary-color); }
.demo-undo:disabled { opacity: .45; cursor: default; }
.demo-note { margin-top: 14px; font-size: 12.5px; color: var(--text-secondary); }
.demo-dash { display: flex; gap: 26px; align-items: flex-start; }
.demo-ring-wrap { flex: none; text-align: center; }
.demo-ring { position: relative; width: 130px; height: 130px; margin: 0 auto; }
.demo-ring-bg { stroke: var(--border-color); }
.demo-ring-fg { stroke: var(--primary-color); stroke-dasharray: 326.73; stroke-dashoffset: 326.73; transition: stroke-dashoffset .6s ease, stroke .3s; }
.demo-ring-fg.over { stroke: var(--amber); }
.demo-ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.2; }
.demo-ring-center strong { font-size: 18px; font-weight: 850; }
.demo-ring-center span { font-size: 11.5px; font-weight: 700; color: var(--text-secondary); }
.demo-ring-label { font-size: 12px; color: var(--text-secondary); margin: 8px auto 0; max-width: 150px; line-height: 1.4; }
.demo-ledger-wrap { flex: 1; min-width: 0; }
.demo-ledger-wrap h4 { font-size: 13.5px; font-weight: 800; color: var(--text-secondary); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .05em; }
.demo-ledger { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.demo-ledger li {
    display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 10px;
    font-size: 13.5px; font-weight: 600;
}
.demo-ledger li.demo-new { animation: rowIn .35s ease-out; }
.demo-ledger li.demo-empty { justify-content: center; background: transparent; border-style: dashed; color: var(--text-secondary); text-align: center; min-height: 46px; }
.demo-row-amt { margin-left: auto; font-weight: 800; color: var(--primary-color); white-space: nowrap; }
.demo-row-amt.pos { color: var(--success-color); }
@keyframes rowIn { from { opacity: 0; transform: translateY(-8px); } }
.demo-tip { display: flex; align-items: flex-start; gap: 12px; margin-top: 22px; background: var(--chip-bg); border-radius: 14px; padding: 14px 16px; }
.demo-tip-badge {
    display: inline-flex; align-items: center; gap: 6px; flex: none;
    background: var(--grad); color: #fff; padding: 5px 11px; border-radius: 999px;
    font-size: 11.5px; font-weight: 800; white-space: nowrap;
}
.demo-tip p { font-size: 14px; font-weight: 600; color: var(--text-primary); margin: 0; }

/* ---------- Personas ---------- */
.personas-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.persona-card {
    background: var(--card); border: 1px solid var(--border-color); border-radius: var(--radius);
    padding: 28px 24px; transition: transform .3s, box-shadow .3s, border-color .3s;
    display: flex; flex-direction: column; align-items: flex-start;
}
.persona-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.persona-icon { width: 46px; height: 46px; border-radius: 13px; background: var(--chip-bg); color: var(--primary-color); display: grid; place-items: center; margin-bottom: 16px; }
.persona-card h3 { font-size: 17.5px; font-weight: 800; margin-bottom: 8px; }
.persona-card p { color: var(--text-secondary); font-size: 14px; flex: 1; }
.persona-tag { display: inline-flex; margin-top: 16px; padding: 5px 12px; border-radius: 999px; background: var(--chip-bg); color: var(--primary-color); font-size: 12px; font-weight: 800; }

/* ---------- Method pipeline ---------- */
.method-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; gap: 10px; align-items: stretch; }
.method-node { position: relative; background: var(--card); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 24px 20px; box-shadow: var(--shadow); }
.method-num { position: absolute; top: 18px; right: 18px; font-size: 12px; font-weight: 850; color: var(--primary-color); opacity: .75; letter-spacing: .05em; }
.method-ic { width: 44px; height: 44px; border-radius: 13px; background: var(--chip-bg); color: var(--primary-color); display: grid; place-items: center; margin-bottom: 14px; }
.method-node h3 { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.method-node p { color: var(--text-secondary); font-size: 13.5px; line-height: 1.55; }
.method-link { display: flex; align-items: center; justify-content: center; }
.method-link path { stroke: var(--primary-color); stroke-width: 2; fill: none; }
.method-link .flow-line { stroke-dasharray: 6 6; animation: flowdash 1s linear infinite; }
.method-link .flow-head { stroke-linecap: round; stroke-linejoin: round; }
@keyframes flowdash { to { stroke-dashoffset: -24; } }
.method-quote { max-width: 620px; margin: 40px auto 0; background: var(--card); border: 1px solid var(--border-color); border-radius: 18px; padding: 20px 24px; box-shadow: var(--shadow); }
.method-quote blockquote { margin: 12px 0 0; font-size: 16.5px; font-weight: 650; line-height: 1.55; color: var(--text-primary); }

/* ---------- Comparison table ---------- */
.compare-scroll { overflow-x: auto; border: 1px solid var(--border-color); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); max-width: 980px; margin: 0 auto; }
.compare-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 14.5px; }
.compare-table th, .compare-table td { padding: 15px 18px; text-align: left; vertical-align: top; }
.compare-table thead th { font-size: 13.5px; font-weight: 800; border-bottom: 1px solid var(--border-color); white-space: nowrap; }
.compare-table tbody th { font-weight: 700; width: 24%; }
.compare-table tbody tr + tr th, .compare-table tbody tr + tr td { border-top: 1px solid var(--border-color); }
.compare-table td { color: var(--text-secondary); font-weight: 600; }
.compare-table .cmp-hero { background: var(--chip-bg); }
.compare-table thead .cmp-hero { position: relative; color: var(--primary-color); }
.compare-table thead .cmp-hero::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad); }
.compare-table td.cmp-hero { color: var(--text-primary); font-weight: 700; }
.cmp-check { display: inline-block; vertical-align: -3px; margin-right: 7px; color: var(--success-color); }
.cmp-check svg { display: inline; }
.cmp-dash { opacity: .55; }
.compare-note { text-align: center; color: var(--text-secondary); font-size: 13px; margin-top: 16px; }

/* ---------- Category marquee ---------- */
.marquee-strip { padding: 26px 0; border-top: 1px solid var(--border-color); background: var(--bg-primary); overflow: hidden; }
.marquee { overflow: hidden; }
.marquee-track { display: flex; width: max-content; animation: marqueeScroll 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.mq-group { display: flex; gap: 12px; padding-right: 12px; }
.mq-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px;
    border-radius: 999px; background: var(--card); border: 1px solid var(--border-color);
    font-weight: 700; font-size: 14px; color: var(--text-secondary); white-space: nowrap;
}
.mq-ic { font-size: 15px; }
@keyframes marqueeScroll { to { transform: translateX(-50%); } }

/* ---------- Footer grid ---------- */
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr; gap: 36px; text-align: left; padding-bottom: 30px; border-bottom: 1px solid var(--border-color); margin-bottom: 24px; }
.footer-brand .nav-brand { font-size: 18px; margin-bottom: 4px; }
.footer-brand .brand-icon img { width: 32px; height: 32px; }
.footer-tag { font-size: 14px; margin: 10px 0 16px; max-width: 30ch; }
.footer-badge svg { height: 44px; }
.footer-col h3 { font-size: 13.5px; font-weight: 800; color: var(--text-primary); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col ul a { color: var(--text-secondary); font-size: 14px; text-decoration: none; transition: color .2s; }
.footer-col ul a:hover { color: var(--primary-color); text-decoration: none; }
.footer-prefs { display: flex; flex-wrap: wrap; gap: 10px; }
.foot-btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px;
    border-radius: 999px; border: 1px solid var(--border-color); background: var(--card);
    color: var(--text-primary); font-weight: 700; font-size: 13.5px; font-family: inherit; cursor: pointer;
    transition: border-color .2s, color .2s;
}
.foot-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }
.foot-btn .i-moon { display: none; }
:root[data-theme="dark"] .foot-btn .i-sun { display: none; }
:root[data-theme="dark"] .foot-btn .i-moon { display: inline-block; }
.footer-bottom p { margin: 5px 0; font-size: 14px; }

/* ---------- New sections responsive ---------- */
@media (max-width: 900px) {
    .demo-panel { grid-template-columns: 1fr; padding: 26px; }
    .method-flow { grid-template-columns: 1fr; gap: 16px; }
    .method-link { display: none; }
    .method-node { border-left: 3px solid var(--primary-color); }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 560px) {
    .demo-dash { flex-direction: column; align-items: center; }
    .demo-ledger-wrap { width: 100%; }
    .demo-ledger-wrap h4 { text-align: center; }
    .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
    .reveal { opacity: 1; transform: none; }
    .demo-ring-fg { transition: none; }
    .marquee-track { animation: none; }
    .method-link .flow-line { animation: none; }
}

/* AI-AVATAR: floating "AI分身" assistant widget */
#aiToggle {
    position: fixed; right: 18px; bottom: 18px; z-index: 1200;
    width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
    background: var(--grad); color: #fff; display: grid; place-items: center;
    box-shadow: 0 10px 26px rgba(239, 68, 68, .38), 0 3px 8px rgba(20, 22, 40, .18);
    transition: transform .2s, box-shadow .2s;
}
#aiToggle:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(239, 68, 68, .46), 0 5px 12px rgba(20, 22, 40, .2); }
#aiToggle svg { display: block; }

#aiPanel {
    position: fixed; right: 18px; bottom: 86px; z-index: 1200;
    width: min(370px, calc(100vw - 24px));
    max-height: min(540px, 75vh);
    display: flex; flex-direction: column;
    background: var(--card); border: 1px solid var(--border-color); border-radius: 16px;
    box-shadow: var(--shadow-lg), var(--shadow);
    overflow: hidden;
}
#aiPanel[hidden] { display: none; }

.ai-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border-color); flex-shrink: 0; }
.ai-avatar { position: relative; width: 34px; height: 34px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.ai-presence { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: var(--success-color); border: 2px solid var(--card); }
.ai-title { font-size: 14px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#aiClose { width: 30px; height: 30px; border-radius: 50%; border: none; background: transparent; color: var(--text-secondary); font-size: 20px; line-height: 1; cursor: pointer; flex-shrink: 0; transition: background .2s, color .2s; }
#aiClose:hover { background: var(--bg-secondary); color: var(--text-primary); }

.ai-msgs { flex: 1; min-height: 140px; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 9px; overscroll-behavior: contain; }
.ai-msg { max-width: 86%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; overflow-wrap: break-word; white-space: pre-wrap; }
.ai-msg.bot { align-self: flex-start; background: var(--bg-secondary); color: var(--text-primary); border-bottom-left-radius: 5px; }
.ai-msg.user { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 5px; }
.ai-typing { display: inline-flex; align-items: center; gap: 5px; padding: 13px; }
.ai-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-secondary); animation: aiBlink 1.2s infinite; }
.ai-typing span:nth-child(2) { animation-delay: .2s; }
.ai-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes aiBlink { 0%, 60%, 100% { opacity: .35; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

.ai-chips { display: flex; flex-wrap: wrap; gap: 7px; padding: 0 14px 10px; flex-shrink: 0; }
.ai-chips[hidden] { display: none; }
.ai-chip { background: var(--chip-bg); color: var(--primary-color); border: none; border-radius: 999px; padding: 7px 12px; font-size: 12.5px; font-weight: 600; font-family: inherit; cursor: pointer; transition: background .2s, color .2s; }
.ai-chip:hover { background: var(--primary-color); color: #fff; }

.ai-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border-color); flex-shrink: 0; }
#aiInput { flex: 1; min-width: 0; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 999px; padding: 9px 15px; font: inherit; font-size: 14px; color: var(--text-primary); outline: none; transition: border-color .2s; }
#aiInput:focus { border-color: var(--primary-color); }
#aiInput::placeholder { color: var(--text-secondary); }
.ai-send { display: inline-flex; align-items: center; gap: 6px; background: var(--grad); color: #fff; border: none; border-radius: 999px; padding: 9px 16px; font-family: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; box-shadow: 0 5px 14px rgba(239, 68, 68, .3); transition: transform .2s, box-shadow .2s; }
.ai-send:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(239, 68, 68, .38); }
.ai-send:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.ai-note { flex-shrink: 0; text-align: center; font-size: 11px; color: var(--text-secondary); padding: 0 12px 9px; margin: 0; }

@media (max-width: 820px) {
    /* keep clear of the sticky download bar */
    #aiToggle { bottom: 84px; }
    #aiPanel { bottom: 152px; max-height: min(480px, 62vh); }
}
@media (max-width: 560px) {
    #aiPanel { right: 10px; width: calc(100vw - 20px); }
}
@media (prefers-reduced-motion: reduce) {
    #aiToggle, .ai-send { transition: none; }
    .ai-typing span { animation: none; }
}
/* /AI-AVATAR */
