/* Public pages share the application's Graphite palette; data/forms stay intact. */
:root {
    color-scheme: dark;
    --primary: #98b9ef;
    --primary-dark: #b7d0f5;
    --primary-light: #27354b;
    --primary-50: #222f42;
    --primary-100: #30415b;
    --primary-200: #455e80;
    --text: #f0f3f8;
    --text-secondary: #d2dbe8;
    --text-muted: #acb9cc;
    --bg: #191f29;
    --bg-alt: #1d2531;
    --surface: #232c3a;
    --border: #394658;
    --gray-200: #394658;
    --gray-900: #f0f3f8;
    --success: #86d8b0;
    --danger: #ffadad;
    --shadow: 0 2px 8px #070b121a;
    --shadow-md: 0 8px 24px #070b1233;
    --shadow-lg: 0 16px 40px #070b124d;
    --shadow-xl: 0 24px 64px #070b1266;
}
html { scroll-padding-top: 88px; }
body { background: var(--bg); color: var(--text); }
a { color: var(--primary); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 4px; }
::selection { background: #98b9ef40; color: #fff; }
.container, .hero-grid > *, .cards-grid > *, .pricing-grid > *,
.contacts-grid > *, .footer-grid > *, .req-value { min-width: 0; }
h1, h2, h3, p, .req-value, .contact-row, .contact-item, .pricing-features li {
    overflow-wrap: anywhere;
}
.btn { min-height: 44px; white-space: normal; text-align: center; }
.btn svg { flex-shrink: 0; }
.btn-primary, .step-num, .pricing-badge {
    background: var(--primary); color: #152030; box-shadow: none;
}
.btn-primary:hover { background: var(--primary-dark); color: #152030; box-shadow: var(--shadow-md); }
.btn-outline { color: var(--primary); border-color: #98b9ef66; }
.btn-outline:hover { background: var(--primary-light); }
.btn-white { background: var(--surface); color: var(--text); border-color: var(--border); }
.nav { background: #202a38ed; border-color: #98b9ef26; }
.nav-inner { gap: 16px; }
.nav-logo { min-width: 0; }
.app-brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; color: var(--text); font-size: 17px; font-weight: 750; letter-spacing: -.025em; }
.app-brand .ui-icon { flex: 0 0 auto; width: 27px; height: 27px; color: var(--primary); }
.nav-right { flex-shrink: 0; }
.nav-burger { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.nav-links { gap: 24px; }
.nav-links a { color: var(--text-secondary); }
.nav-mobile { background: #202a38; }
.nav-mobile-link { min-height: 44px; }
.hero { background: radial-gradient(ellipse at 78% 15%, #344d702e, transparent 58%), var(--bg); padding: 48px 0; }
.hero::before { display: none; }
.hero-title { font-size: clamp(30px, 4.4vw, 52px); white-space: normal; line-height: 1.12; font-weight: 750; }
.hero-sub { max-width: 550px; color: var(--text-secondary); }
.hero-grid { gap: 36px; }
.hero-cta { flex-wrap: wrap; align-items: stretch; }
.hero-badge, .hero-tag { line-height: 1.35; }
.hero-tag { white-space: normal; text-align: left; }
.hero-image { min-width: 0; padding: 12px 0; }
.iphone-mock { width: min(100%, 270px); max-width: 100%; }
.iphone-frame { background: #0f151e; border-radius: 32px; padding: 7px; box-shadow: 0 24px 60px #070b1259, 0 0 0 1px #98b9ef33; }
.iphone-screen { background: #191f29; aspect-ratio: 390 / 844; border-radius: 25px; }
.product-screen { display: block; width: 100%; height: 100%; object-fit: contain; }
.product-caption { text-align: center; margin: 0 auto 24px; color: var(--text-muted); font-size: 12px; }
.demo-phones { display: grid; gap: 24px; overflow: visible; padding: 0; }
.demo-phone-item { width: 100%; min-width: 0; }
.demo-phone-label { max-width: 460px; margin: 16px auto 0; line-height: 1.5; }
.product-desktop-frame { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 6px 6px; background: #101722; border: 1px solid #98b9ef33; border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.product-window-bar { display: flex; gap: 6px; align-items: center; height: 26px; padding: 0 8px; }
.product-window-bar span { width: 6px; height: 6px; border-radius: 50%; background: #8e9db3; }
.product-desktop-frame img { display: block; width: 100%; aspect-ratio: 8 / 5; object-fit: contain; object-position: top; background: #191f29; border-radius: 8px; }
.section { padding: 56px 0; }
.section-title { font-weight: 700; line-height: 1.2; }
.section-sub { color: var(--text-muted); }
.proof-card, .blog-card { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow); }
.proof-card:hover, .step:hover, .feature-card:hover { border-color: #98b9ef80; box-shadow: var(--shadow-md); }
.step, .feature-card, .pricing-card { border-radius: 16px; }
.icon-box { background: var(--primary-light); color: var(--primary); }
.step-num { border-radius: 11px; }
.pricing-grid { gap: 24px; }
.pricing-card.recommended { background: linear-gradient(160deg, #2b3c54, var(--surface) 70%); border-color: var(--primary); box-shadow: var(--shadow-md); }
.pricing-features li.feature-disabled { opacity: .75; }
.pricing-badge { max-width: calc(100% - 24px); }
.faq-item, .faq-question, .faq-answer { border-color: var(--border); }
.faq-question:hover { background: #27354b66; }
.faq-answer { color: var(--text-secondary); }
.form-input {
    background: #1b2431; color: var(--text); border-color: #4b5d75;
    max-width: 100%; min-width: 0; font-size: 16px;
}
.form-input::placeholder { color: #a5b3c8; opacity: 1; }
.footer { background: #151c25; border-color: var(--border); }
.footer-logo { color: var(--text); }
.footer a { color: var(--text-secondary); }
.footer a:hover { color: var(--primary); }
.footer-bottom, .footer-col, .footer-brand { min-width: 0; overflow-wrap: anywhere; }
.footer .app-brand { font-size: 17px; }
.cookie-banner { background: #27354bf5; border-top: 1px solid #98b9ef40; color: var(--text-secondary); }
.cookie-actions { flex-wrap: wrap; justify-content: center; flex-shrink: 0; }
.cookie-actions .btn { min-height: 40px; }
.legal-content { color: var(--text-secondary); overflow-wrap: anywhere; }
.legal-content table { display: block; max-width: 100%; overflow-x: auto; }
.legal-content img { height: auto; max-width: 100%; }
.req-row { border-color: var(--border); }
[data-animate] { opacity: 1; transform: none; }
@media (min-width: 640px) {
    .section { padding: 80px 0; }
}
@media (min-width: 768px) {
    .hero { padding: 72px 0; }
    .hero-grid { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; }
    .hero-image .iphone-mock { width: 290px; }
    .hero-cta { align-items: center; }
}
@media (min-width: 1024px) {
    .hero { padding: 88px 0; }
    .hero-image .iphone-mock { width: 306px; }
}
@media (max-width: 767px) {
    .nav:not(#nav) .nav-right .btn { display: inline-flex; padding: 8px 10px; font-size: 12px; }
    .hero-sub { margin-left: auto; margin-right: auto; }
    .hero-cta { max-width: 390px; margin-left: auto; margin-right: auto; }
    .cards-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 479px) {
    .nav-inner { gap: 8px; }
    .app-brand { font-size: 15px; gap: 7px; }
    .app-brand .ui-icon { width: 24px; height: 24px; }
    .cards-grid, .cards-grid.cols-3, .cards-grid.cols-4, .pricing-grid { grid-template-columns: minmax(0, 1fr); }
    .feature-card, .pricing-card { padding: 24px 20px; }
    .pricing-name { font-size: 20px; }
    .price-amount { font-size: 38px; }
    .pricing-features li { font-size: 14px; }
    .hero-title { font-size: 32px; }
    .hero-cta .btn { width: 100%; }
    .hero-tags { gap: 6px; }
    .hero-tag { padding: 7px 10px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .nav, .cookie-banner { background: #27354b; }
}

/* Presentation rhythm for the public home page; application styles are untouched. */
body[data-page-type="landing"] .hero { padding: 40px 0 32px; }
body[data-page-type="landing"] .hero-grid { gap: 28px; }
body[data-page-type="landing"] .hero-content { position: relative; z-index: 1; }
body[data-page-type="landing"] .hero-title {
    max-width: 18ch; margin-left: auto; margin-right: auto;
    font-size: clamp(34px, 4.6vw, 58px); line-height: 1.08;
    letter-spacing: -.045em; text-wrap: balance; overflow-wrap: normal;
}
body[data-page-type="landing"] .hero-sub { max-width: 46ch; line-height: 1.65; text-wrap: pretty; }
body[data-page-type="landing"] .hero-cta { gap: 12px; margin-top: 26px; }
body[data-page-type="landing"] .hero-cta .btn { padding: 13px 20px; border-radius: 12px; font-size: 14px; }
body[data-page-type="landing"] .btn-primary {
    background-image: linear-gradient(120deg, #ffffff18, transparent 65%);
    border: 1px solid #c9dcfa40; box-shadow: 0 6px 20px #0a101f33;
}
body[data-page-type="landing"] .hero-tags { margin-top: 20px; }
body[data-page-type="landing"] .hero-tag { background: transparent; border-color: #98b9ef24; font-weight: 500; }
body[data-page-type="landing"] .hero-image { position: relative; isolation: isolate; }
body[data-page-type="landing"] .hero-image::before {
    content: ""; position: absolute; inset: 9% -3%; z-index: -1; pointer-events: none;
    background: radial-gradient(ellipse at center, #98b9ef20, #354d7020 42%, transparent 70%);
}
body[data-page-type="landing"] .hero-image .iphone-mock { width: 224px; }
body[data-page-type="landing"] .section { padding: 48px 0; }
body[data-page-type="landing"] .section-title {
    font-size: clamp(26px, 3vw, 36px); letter-spacing: -.035em; text-wrap: balance;
}
body[data-page-type="landing"] .section-sub { margin-bottom: 28px; max-width: 58ch; text-wrap: pretty; }
body[data-page-type="landing"] .section-alt { background-color: #1c2430; }
body[data-page-type="landing"] .social-proof { padding: 8px 0 32px; }
body[data-page-type="landing"] .proof-grid {
    max-width: none; gap: 0; border: 1px solid #98b9ef26; border-radius: 16px;
    background: linear-gradient(110deg, #27354b70, #202a3870); overflow: hidden;
}
body[data-page-type="landing"] .proof-card {
    border: 0; border-radius: 0; background: transparent; box-shadow: none;
    padding: 20px 10px; transform: none;
}
body[data-page-type="landing"] .proof-card:nth-child(odd) { border-right: 1px solid #98b9ef1f; }
body[data-page-type="landing"] .proof-card:nth-child(n+3) { border-top: 1px solid #98b9ef1f; }
body[data-page-type="landing"] .proof-num { font-size: clamp(24px, 2.7vw, 32px); font-weight: 650; }
body[data-page-type="landing"] .proof-label { color: var(--text-secondary); }
body[data-page-type="landing"] .step,
body[data-page-type="landing"] .feature-card {
    background: linear-gradient(145deg, #2a374650, #202a38); border-color: #98b9ef24;
    transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
body[data-page-type="landing"] .step { padding: 24px 20px; }
body[data-page-type="landing"] .feature-card { padding: 24px; }
body[data-page-type="landing"] .step-num { background: #98b9ef1a; color: var(--primary); border: 1px solid #98b9ef3d; }
body[data-page-type="landing"] .pricing-grid { padding-top: 10px; }
body[data-page-type="landing"] .pricing-card { padding: 28px 24px; }
body[data-page-type="landing"] .faq-item { border-radius: 12px; }
body[data-page-type="landing"] .faq-q { padding: 18px 20px; }
body[data-page-type="landing"] .faq-a { padding-left: 20px; padding-right: 20px; }
body[data-page-type="landing"] #contacts { border-top: 1px solid #98b9ef1a; }

/* One composed stage: editor first on compact screens, flanked by phones on desktop. */
#demo.product-demo {
    background: radial-gradient(ellipse at 50% 54%, #739bd01f, transparent 66%), #1c2430;
    border-top: 1px solid #98b9ef14; border-bottom: 1px solid #98b9ef14;
}
.product-showcase {
    position: relative; isolation: isolate;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas: "editor editor" "report settings";
    align-items: center; gap: 24px 18px; max-width: 1180px; margin: 0 auto;
    scroll-snap-type: none;
}
.product-showcase-editor { grid-area: editor; }
.product-showcase-report { grid-area: report; }
.product-showcase-settings { grid-area: settings; }
.product-showcase .demo-phone-item { margin: 0; }
.product-showcase .iphone-mock { width: min(100%, 164px); margin-left: auto; margin-right: auto; }
.product-showcase .iphone-frame { padding: 5px; border-radius: 21px; box-shadow: 0 20px 40px #070b124d, 0 0 0 1px #98b9ef38; }
.product-showcase .iphone-screen { border-radius: 16px; }
.product-showcase .product-desktop-frame {
    padding: 0 4px 4px; border-radius: 12px; max-width: 760px;
    box-shadow: 0 24px 50px #070b1259, 0 0 28px #98b9ef08;
}
.product-showcase .product-window-bar { height: 20px; gap: 4px; }
.product-showcase .product-window-bar span { width: 5px; height: 5px; background: #98b9ef80; }
.product-showcase .product-desktop-frame img { border-radius: 6px; }
.product-showcase .demo-phone-label { margin-top: 12px; font-size: 11px; font-weight: 500; color: var(--text-secondary); }
#demo .product-caption { margin: 26px auto 0; max-width: 42ch; font-size: 11px; line-height: 1.5; }

@media (min-width: 640px) {
    body[data-page-type="landing"] .section { padding: 64px 0; }
    body[data-page-type="landing"] .proof-card:not(:last-child) { border-right: 1px solid #98b9ef1f; }
    body[data-page-type="landing"] .proof-card:nth-child(n+3) { border-top: 0; }
    .product-showcase { gap: 28px; }
    .product-showcase .demo-phone-label { font-size: 12px; }
}
@media (min-width: 768px) {
    body[data-page-type="landing"] .hero { padding: 48px 0 40px; }
    body[data-page-type="landing"] .hero-grid { gap: 36px; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); }
    body[data-page-type="landing"] .hero-title { margin-left: 0; margin-right: 0; }
    body[data-page-type="landing"] .hero-image .iphone-mock { width: 256px; }
    body[data-page-type="landing"] .social-proof { padding-bottom: 48px; }
    .product-showcase {
        grid-template-columns: minmax(0, .7fr) minmax(0, 2.4fr) minmax(0, .7fr);
        grid-template-areas: "report editor settings"; gap: clamp(12px, 1.8vw, 24px);
        padding: 14px 0 4px;
    }
    .product-showcase .iphone-mock { width: 100%; max-width: 210px; }
    .product-showcase .demo-phone-label { min-height: 3em; display: flex; align-items: flex-start; justify-content: center; }
}
@media (min-width: 1024px) {
    #demo > .container { max-width: 1240px; padding-left: 24px; padding-right: 24px; }
    .product-showcase .iphone-frame { padding: 6px; border-radius: 27px; }
    .product-showcase .iphone-screen { border-radius: 21px; }
    .product-showcase .product-window-bar { height: 24px; }
    .product-showcase .demo-phone-label { font-size: 13px; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .product-showcase .iphone-frame, .product-showcase .product-desktop-frame {
        transition: transform .28s ease, box-shadow .28s ease;
    }
    .product-showcase .demo-phone-item:hover .iphone-frame,
    .product-showcase .demo-phone-item:hover .product-desktop-frame {
        transform: translateY(-5px); box-shadow: 0 28px 52px #070b1266, 0 0 0 1px #98b9ef40;
    }
}
@media (prefers-reduced-motion: no-preference) {
    body[data-page-type="landing"] [data-animate].animate-in { animation: landing-reveal .55s ease-out backwards; }
    body[data-page-type="landing"] .hero-content { animation: landing-reveal .6s ease-out backwards; }
    body[data-page-type="landing"] .hero-image { animation: landing-reveal .7s .08s ease-out backwards; }
    @keyframes landing-reveal {
        from { opacity: .35; transform: translateY(12px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

/* Image links retain native navigation if JavaScript or <dialog> is unavailable. */
.product-demo-link { display: block; color: var(--text-muted); text-decoration: none; border-radius: 12px; }
.product-demo-link:focus-visible { outline-offset: 6px; }
.product-demo-open { display: inline-flex; align-items: center; justify-content: center; gap: 5px; margin-top: 12px; font-size: 11px; line-height: 1.5; }
.product-demo-open svg { flex: 0 0 auto; }
.product-demo-link:hover .product-demo-open,
.product-demo-link:focus-visible .product-demo-open { color: var(--primary); }
.product-showcase .demo-phone-label { margin-top: 5px; }
.product-lightbox:not([open]) { display: none; }
.product-lightbox {
    margin: auto; padding: 0; width: min(1140px, calc(100% - 24px));
    max-width: none; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
    color: var(--text); background: #191f29; border: 1px solid #98b9ef55;
    border-radius: 16px; box-shadow: 0 24px 80px #0008; overflow: hidden;
}
.product-lightbox[open] { display: flex; flex-direction: column; }
.product-lightbox::backdrop { background: #070d17d9; }
.product-lightbox-header { display: flex; align-items: center; gap: 12px; padding: 10px 12px 0 18px; flex: 0 0 auto; }
.product-lightbox-header h2 { min-width: 0; flex: 1; margin: 0; font-size: 16px; line-height: 1.4; font-weight: 650; }
.product-lightbox-close {
    display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    flex: 0 0 auto; border: 1px solid transparent; border-radius: 10px;
    background: transparent; color: var(--text); cursor: pointer;
}
.product-lightbox-close:hover { background: #27354b; }
.product-lightbox-toolbar { display: flex; align-items: center; gap: 12px; padding: 0 18px 12px; flex: 0 0 auto; }
.product-lightbox-toolbar p { margin: 0; color: var(--text-muted); font-size: 11px; line-height: 1.5; }
.product-lightbox-zoom {
    flex: 0 0 auto; min-height: 40px; padding: 7px 12px; border: 1px solid #98b9ef55;
    border-radius: 8px; background: transparent; color: var(--primary); font-size: 12px; cursor: pointer;
}
.product-lightbox-zoom[aria-pressed="true"] { background: var(--primary); color: #152030; }
.product-lightbox-viewport { min-height: 0; padding: 8px; overflow: auto; overscroll-behavior: contain; background: #111925; }
.product-lightbox-image { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 152px); max-height: calc(100dvh - 152px); object-fit: contain; margin: 0 auto; }
.product-lightbox-actual .product-lightbox-image { max-width: none; max-height: none; margin: 0; }
@media (max-width: 479px) {
    .product-lightbox { border-radius: 12px; }
    .product-lightbox-header { padding-left: 12px; gap: 8px; }
    .product-lightbox-header h2 { font-size: 14px; }
    .product-lightbox-toolbar { padding-left: 12px; padding-right: 12px; gap: 8px; }
}
