/* Hover and focus feedback shared by every public page. */
.landing-page {
  --hover-time: 220ms;
  --hover-ease: cubic-bezier(.2, .75, .25, 1);
  --hover-ink: var(--ui-link, #375ce9);
  --hover-border: var(--ui-focus-border, #a5b8f7);
  --hover-tint: var(--ui-accent-bg, #edf2ff);
  --hover-shadow: 0 12px 30px #253f8814, 0 3px 8px #375ce90c;
}
.landing-page > .site-header { position: sticky; top: 0; z-index: 90; width: 100%; max-width: none; background: var(--ui-surface,#fff); padding-inline: max(28px,calc((100% - 1184px)/2)); border-bottom: 1px solid transparent; transition: box-shadow .2s,border-color .2s; }
/* Accessible secondary text across the public site's light palette. Dark mode
   keeps its existing contrast-safe theme tokens. */
html:not([data-site-theme="dark"]) .landing-page { --ui-muted:#516179; --muted:var(--ui-muted); --ui-link:#304cc1; --ui-warning:#87500e; --ui-success:#146b40; }
.landing-page :is(.browser-url,.store-mini,.demo-input,.preview-field,.article-number) { color:var(--ui-muted,#516179); }
.landing-page .chat-story-message.visitor time { color:#fff; }
.landing-page .pricing-caption a { text-decoration:underline; text-underline-offset:3px; font-weight:650; }
.landing-page .price-card.featured { background:radial-gradient(ellipse at 98% 0%,#4b63ca 0%,transparent 53%),linear-gradient(145deg,#283ebd,#30237c 53%,#111e3b); }
.landing-page .price-card.featured :is(.price-name,.price-desc,.price-value>span,.price-popular) { color:#fff; }
.landing-page .price-card.featured .price-popular { background:#15234855; border-color:#ffffff60; }

/* Scripted, local demo. No external AI requests and no layout shifts. */
.landing-visual [data-hero-chat]{transition:opacity .24s,transform .24s;display:flex;flex-direction:column;max-height:calc(100% - 104px)}
.landing-visual [data-hero-chat][data-phase=closed]{opacity:0;transform:translateY(18px) scale(.96);pointer-events:none;visibility:hidden}
.landing-visual .demo-conversation{position:relative;min-height:218px;overflow-y:auto;scrollbar-width:thin;flex:1 1 auto}
.landing-visual .demo-chat-header,.landing-visual .demo-options,.landing-visual .demo-input{flex:none}
.landing-visual .demo-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding:7px 10px}
.landing-visual .demo-options button{font-size:11px;padding:5px 6px;white-space:nowrap;line-height:1.2;border:1px solid var(--ui-border,#dce4ef);border-radius:6px;color:var(--ui-muted,#516179);background:var(--ui-surface,#fff)}
.landing-visual .demo-options button[aria-pressed=true]{background:var(--ui-accent-bg,#edf2ff);color:var(--ui-link,#375ce9);border-color:var(--ui-focus-border,#b5c8f9)}
.landing-visual .demo-input{display:flex;align-items:center;gap:6px;justify-content:space-between;min-height:40px;padding:8px 10px;line-height:1.35;border-top:1px solid var(--ui-border,#dce4ef)}
.landing-visual .demo-input span{float:none;font-size:12px;color:inherit;min-width:0;overflow-wrap:anywhere}.landing-visual .demo-input b{flex:none;color:var(--ui-link,#375ce9)}
.landing-visual [data-phase=compose] :is(#demo-question,#demo-answer,.demo-suggested),.landing-visual [data-phase=waiting] :is(#demo-answer,.demo-suggested),.landing-visual [data-phase=answer] .demo-suggested{display:none}
.landing-visual .demo-typing{display:flex;gap:4px;padding:12px;width:fit-content;border-radius:12px;background:var(--ui-accent-bg,#eaf0ff)}.demo-typing[hidden]{display:none!important}.demo-typing i{height:6px;width:6px;border-radius:50%;background:var(--ui-link,#375ce9);animation:hero-typing .9s infinite alternate}.demo-typing i:nth-child(2){animation-delay:.15s}.demo-typing i:nth-child(3){animation-delay:.3s}
@keyframes hero-typing{from{opacity:.35;transform:translateY(0)}to{opacity:1;transform:translateY(-3px)}}
.hero-demo-launcher{position:absolute;right:24px;bottom:65px;display:grid;place-items:center;width:57px;height:57px;padding:0;border-radius:50%;background:#375ce9;color:#fff;font-size:32px;box-shadow:0 0 0 7px #375ce925;z-index:4}.hero-demo-pause{position:absolute;right:16px;top:40px;z-index:5;padding:4px 8px;border:1px solid var(--ui-border,#dce4ef);border-radius:7px;background:var(--ui-surface,#fff);color:var(--ui-muted,#516179);font-size:10px;line-height:1.3}.hero-demo-launcher[hidden],.hero-demo-pause[hidden]{display:none!important}
@media(max-width:540px){.landing-visual [data-hero-chat]{max-height:calc(100% - 84px)}.landing-visual .demo-conversation{min-height:160px}.hero-demo-pause{top:36px;right:12px}}
@media(prefers-reduced-motion:reduce){.landing-visual [data-hero-chat],.demo-typing i{animation:none;transition:none}}
.article-visual [data-hero-chat]{transition:opacity .24s,transform .24s}.article-visual [data-phase=closed]{opacity:0;transform:translateY(12px) scale(.98);pointer-events:none;visibility:hidden}.article-visual [data-phase=compose] :is(#article-example-question,#article-example-answer),.article-visual [data-phase=waiting] #article-example-answer{display:none}.article-visual .article-demo-dialog{min-height:170px}.article-visual .article-demo-input{gap:10px;min-height:40px}.article-visual .article-demo-input>span{min-width:0;overflow-wrap:anywhere;color:inherit}.article-visual .demo-typing{display:flex;gap:4px;padding:12px;width:fit-content;border-radius:12px;background:var(--ui-accent-bg,#eaf0ff)}.article-visual .hero-demo-pause{top:40px;right:14px}
@media(prefers-reduced-motion:reduce){.article-visual [data-hero-chat]{transition:none}}
/* The headline has two stable rows; the longest replacement fits the first.
   Keep the changing word on one line rather than reflowing the CTA on each key. */
.landing-hero .home-hero-title{font-size:clamp(36px,4.5vw,62px)}
.home-hero-title .hero-title-role{display:block;white-space:nowrap;min-height:1.08em}
.home-hero-title em{display:block}
@media(max-width:540px){.landing-hero .home-hero-title{font-size:clamp(28px,8.5vw,40px);letter-spacing:-1.4px}}

/* Isolated hero demo palette: the cabinet preview has its own class names. */
.landing-visual [data-hero-chat]{height:calc(100% - 104px);max-height:none;gap:0;padding:0;background:var(--ui-surface,#fff)}
.landing-visual .demo-chat-header{background:#304bc3;color:#fff;padding:12px 13px}
.landing-visual .demo-chat-header small{color:#f0f4ff;opacity:1}
.landing-visual .demo-chat-header .demo-avatar{background:#ffffff24;color:#fff}
.article-visual .article-demo-header .demo-avatar{background:#304bc3;color:#fff}
.article-visual .article-demo-header{color:var(--ui-text,#17243c)}
.landing-visual .demo-conversation{min-height:0;flex:1 1 0;background:var(--ui-subtle,#f7f9fc);overscroll-behavior:contain}
.article-visual .article-demo-dialog{height:230px;min-height:0;overflow-y:auto;scrollbar-width:thin;overscroll-behavior:contain;background:var(--ui-surface,#fff)}
:is(.landing-visual,.article-visual) [data-hero-chat] .demo-bubble{flex-shrink:0;font-size:13px;line-height:1.5}
:is(.landing-visual,.article-visual) [data-hero-chat] .demo-bubble:not(.buyer){background:var(--ui-accent-bg,#e5edf9);color:var(--ui-text,#17243c);border:1px solid var(--ui-border,#d9e3f0)}
:is(.landing-visual,.article-visual) [data-hero-chat] .demo-bubble.buyer{background:#304bc3;color:#fff}
.landing-visual .demo-bubble.answer{min-height:0}
.landing-visual .demo-options button[aria-pressed=true],.article-visual .article-demo-choices button[aria-pressed=true]{background:#304bc3;color:#fff;border-color:#304bc3}
.landing-visual .demo-input,.article-visual .article-demo-input{background:var(--ui-surface,#fff);padding:8px 10px;gap:8px;min-height:60px;margin:0}
:is(.landing-visual .demo-input,.article-visual .article-demo-input)>span{flex:1;min-width:0;height:42px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere;border:1px solid var(--ui-border,#d7e0ed);background:var(--ui-subtle,#f4f7fb);color:var(--ui-muted,#46566f);padding:5px 10px;border-radius:9px;font-size:12.5px;line-height:15px}
:is(.landing-visual,.article-visual) [data-phase=compose] [data-demo-compose]{color:var(--ui-text,#17243c)}
:is(.landing-visual,.article-visual) [data-hero-chat]:not([data-phase=compose]) [data-demo-compose]{display:flex;align-items:center;padding-block:0}
:is(.landing-visual .demo-input,.article-visual .article-demo-input)>b{display:grid;place-items:center;width:32px;height:32px;flex:none;background:#304bc3;color:#fff;border-radius:8px}
.article-visual .article-demo-window{margin:20px auto 14px}
.article-visual .article-visual-badge{position:relative;left:auto;bottom:auto;align-self:flex-start;margin:0}
@media(max-width:540px){.landing-visual [data-hero-chat]{height:calc(100% - 84px)}.article-visual .article-demo-dialog{height:214px}}
.landing-page > .site-header.is-scrolled { border-bottom-color: var(--ui-border,#e3e8ef); box-shadow: 0 5px 18px #17243c0c; }
.landing-page :is([id]) { scroll-margin-top: 90px; }
.public-back-top { position: fixed; left: max(18px,env(safe-area-inset-left)); bottom: max(20px,env(safe-area-inset-bottom)); z-index: 80; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; margin: 0; border-radius: 12px; border: 1px solid var(--ui-border,#dce4ef); background: var(--ui-surface,#fff); color: var(--ui-link,#375ce9); box-shadow: 0 5px 18px #17243c18; }
.public-back-top[hidden] { display: none!important; }
.landing-page:has([data-ai-consultant-widget][data-position="bottom-left"]) .public-back-top { bottom: max(92px,calc(env(safe-area-inset-bottom) + 72px)); }
.public-back-top:hover { background: var(--ui-accent-bg,#edf2ff); }
@media(max-width:900px) { .landing-page > .site-header { padding-inline: 20px; } }
.landing-page .landing-nav { gap:20px; }
@media(min-width:881px) and (max-width:1160px) {
  .landing-page > .site-header { gap:12px; padding-inline:18px; }
  .landing-page .landing-nav { display:flex; gap:11px; font-size:13px; }
  .landing-page > .site-header .brand { font-size:18px; }
  .landing-page > .site-header .nav-actions > :is(.primary,.ghost) { font-size:13px; padding-inline:11px; }
}
@media(min-width:881px) and (max-width:980px) {
  .landing-page .landing-nav { font-size:12px; gap:8px; }
  .landing-page > .site-header .brand { font-size:16px; }
  .landing-page > .site-header .brand .logo { width:32px; height:32px; }
}
@media(max-width:540px) { .landing-page > .site-header { padding-inline: 14px; } .public-back-top { width: 38px; height: 38px; left: 14px; bottom: 15px; } .landing-page :is([id]) { scroll-margin-top: 105px; } }

html[data-site-theme="dark"] .landing-page {
  --hover-shadow: 0 12px 30px #0005, 0 0 0 1px #718ac619;
}

.landing-page :is(a, button, input, summary, .feature-icon, .glossary-card-icon, .glossary-chevron, .how-step > span) {
  transition: color var(--hover-time) ease, background-color var(--hover-time) ease,
    border-color var(--hover-time) ease, box-shadow var(--hover-time) ease,
    transform var(--hover-time) var(--hover-ease), text-decoration-color var(--hover-time) ease;
}

/* Cards and accordion containers keep their dimensions as they react. */
.landing-page :is(.landing-feature, .blog-card, .glossary-card, .faq-list details,
  .article-guide-row, .public-terms > div, .how-preview, .article-file-stack,
  .article-file, .glossary-visual-cards > div, .blog-aside-card, .blog-article-cta,
  .blog-toc, .blog-toc-mobile, .glossary-searchbox, .glossary-search,
  .landing-visual, .article-visual, .glossary-hero-visual) {
  transition: border-color var(--hover-time) ease, box-shadow var(--hover-time) ease,
    transform var(--hover-time) var(--hover-ease), background-color var(--hover-time) ease;
}

.landing-page :is(.landing-feature, .blog-card, .glossary-card, .faq-list details,
  .public-terms > div, .blog-toc, .glossary-searchbox, .glossary-search,
  .blog-aside-card, .blog-article-cta):focus-within {
  border-color: var(--hover-border);
  box-shadow: var(--hover-shadow);
}

.landing-page :is(.demo-browser, .demo-chat, .visual-floater, .article-demo-window,
  .article-visual-badge, .blog-card-mark, .glossary-sparkle, .file-type,
  .article-guide-row > span, .blog-read > span, .public-link-grid > a > span,
  .landing-pill .pill-star, .brand .logo, .site-theme-toggle svg, .landing-proof b),
.landing-final::after, .faq-list summary::after {
  transition: transform 320ms var(--hover-ease), box-shadow var(--hover-time) ease;
}
.landing-page :is(h1, h2, h3, dt, .glossary-card-title strong) {
  transition: color var(--hover-time) ease;
}
.public-link-grid > a > span { display: inline-block; }
.landing-page :is(.landing-nav a, .public-crumbs a, .blog-prose a,
  .legal-page a, .public-footer a, .blog-source a, .glossary-article-link) {
  text-underline-offset: .23em;
}
.landing-nav a { position: relative; }
.landing-nav a::after {
  content: '';
  position: absolute;
  inset: auto 0 -7px;
  height: 2px;
  border-radius: 2px;
  background: var(--hover-ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--hover-time) var(--hover-ease);
}
.landing-nav a:focus-visible::after,
.landing-nav a[aria-current="page"]::after { transform: scaleX(1); }

/* Pointer-specific styling avoids sticky hover effects on touch screens. */
@media (hover: hover) and (pointer: fine) {
  .landing-page :is(.landing-feature, .blog-card, .glossary-card, .faq-list details,
    .article-guide-row, .public-terms > div, .how-preview, .article-file-stack,
    .article-file, .glossary-visual-cards > div, .blog-aside-card, .blog-article-cta,
    .blog-toc, .blog-toc-mobile, .landing-visual, .article-visual, .glossary-hero-visual):hover {
    border-color: var(--hover-border);
    box-shadow: var(--hover-shadow);
  }
  .landing-nav a:hover::after { transform: scaleX(1); }
  .landing-page :is(.landing-nav a, .public-crumbs a, .blog-prose a:not(.primary),
    .legal-page a, .public-footer a:not(.brand), .blog-source a,
    .blog-card-body h2 a, .glossary-article-link, .blog-pagination a):hover {
    color: var(--hover-ink);
  }
  .landing-page :is(.public-crumbs a, .blog-card-body h2 a, .blog-source a,
    .legal-page a:not(.outline), .glossary-article-link, .blog-pagination a):hover {
    text-decoration: underline;
  }
  .landing-page :is(.outline, .ghost, .glossary-quick a, .blog-topics a,
    .glossary-filters button:not([aria-pressed="true"]), .glossary-actions button,
    .article-demo-choices button:not([aria-pressed="true"]), .demo-options button:not([aria-pressed="true"])):hover {
    background-color: var(--hover-tint);
    color: var(--hover-ink);
    border-color: var(--hover-border);
  }
  .landing-page :is(a.primary, button.primary, .landing-final > a):hover {
    box-shadow: 0 10px 22px #375ce935;
  }
  .landing-page :is(.faq-list summary, .glossary-card summary, .blog-toc-mobile summary):hover {
    color: var(--hover-ink);
  }
  .glossary-card summary:hover .glossary-card-title strong { color: var(--hover-ink); }
  .glossary-card summary:hover .glossary-chevron { background-color: var(--hover-tint); }
  .landing-page :is(.how-step, .landing-feature, .article-guide-row, .public-terms > div):hover :is(h2, h3, dt) {
    color: var(--hover-ink);
  }
  .landing-page :is(.glossary-searchbox, .glossary-search, .legal-table-wrap):hover {
    border-color: var(--hover-border);
  }
  .landing-page :is(.hero-summary h1, .landing-section-head h2, .legal-page h2,
    .blog-prose h2, .blog-prose h3, .blog-hero h1, .blog-article-hero h1, .glossary-hero h1):hover {
    color: var(--hover-ink);
  }
  .legal-table td { transition: background-color var(--hover-time) ease; }
  .legal-table tbody tr:hover td { background-color: var(--ui-subtle, #f4f7fc); }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .landing-page :is(.landing-feature, .blog-card, .article-guide-row,
    .public-terms > div, .how-preview, .glossary-visual-cards > div,
    .blog-aside-card, .blog-article-cta):hover { transform: translateY(-4px); }
  .landing-page :is(.faq-list details, .glossary-card, .article-file):hover {
    transform: translateY(-2px);
  }
  .landing-page :is(a.primary, a.outline, .landing-final > a, .glossary-quick a,
    .glossary-filters button, .blog-topics a, .cookie-banner-actions button,
    .demo-options button, .article-demo-choices button):not(:disabled):hover {
    transform: translateY(-2px);
  }
  .landing-page :is(.landing-feature, .how-preview):hover .feature-icon,
  .glossary-card summary:hover .glossary-card-icon,
  .article-file:hover .file-type,
  .how-step:hover > span, .article-guide-row:hover > span {
    transform: translateY(-2px) scale(1.08);
  }
  .brand:hover .logo, .site-theme-toggle:hover svg { transform: rotate(-8deg) scale(1.08); }
  .landing-pill:hover .pill-star { transform: rotate(20deg); }
  .landing-proof span:hover b, .faq-list summary:hover::after { transform: scale(1.13); }
  .landing-visual:hover .demo-browser { transform: translate(-3px, 2px); }
  .landing-visual:hover .demo-chat { transform: translate(2px, -4px); }
  .landing-visual:hover .visual-floater,
  .article-visual:hover .article-visual-badge { transform: translateY(-4px); }
  .article-visual:hover .article-demo-window { transform: translateY(-3px); }
  .glossary-hero-visual:hover .glossary-sparkle { transform: rotate(8deg) scale(1.06); }
  .blog-card:hover .blog-card-mark { transform: scale(1.09); }
  .blog-read:hover > span, .public-link-grid > a:hover > span { transform: translateX(4px); }
  .landing-final:hover::after { transform: scale(1.13); }
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes public-details-in {
    from { opacity: .6; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .landing-page :is(.faq-list details, .glossary-card, .blog-toc-mobile)[open] > :not(summary) {
    animation: public-details-in 200ms var(--hover-ease) both;
  }
  .landing-page :is(button, a.primary, a.outline):not(:disabled):active {
    transform: scale(.98);
  }
}
@media (hover: none), (pointer: coarse) {
  .landing-page :is(button, .blog-card):hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .landing-page *, .landing-page *::before, .landing-page *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .landing-page :is(button, .blog-card):hover { transform: none; }
}
