:root {
  --bg: #F6F4EF; --surface: #FFFFFF; --surface-2: #F1EEE6; --ink: #14213D; --muted: #5B6475;
  --primary: #0F766E; --primary-ink: #FFFFFF; --primary-soft: #E3F1EF; --accent: #F59E0B;
  --border: #E5E1D8; --border-strong: #CFC9BC; --danger: #B91C1C; --link: #0B5F58;
  --head: #14213D; --head-ink: #F4F6FB; --bubble-bot: #FFFFFF; --shadow: 0 12px 40px rgba(20, 33, 61, .18);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1626; --surface: #16213A; --surface-2: #1D2A47; --ink: #E7ECF5; --muted: #9AA6BE;
    --primary: #14958B; --primary-soft: #14313A; --border: #2A3652; --border-strong: #3A4868; --link: #5EEAD4;
    --head: #0A111F; --bubble-bot: #1B2845; --shadow: 0 12px 40px rgba(0, 0, 0, .5);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink); line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); max-width: 18ch; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.wrap { width: min(1080px, 92vw); margin-inline: auto; }
.narrow { width: min(760px, 92vw); }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { inset-inline-start: 8px; }
.ic { display: block; flex: none; }
.ic .accent { fill: var(--accent); stroke: none; }
.ic .node { fill: currentColor; stroke: none; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; }

/* buttons */
.btn { font: inherit; font-weight: 600; border-radius: 10px; padding: 10px 18px; border: 1.5px solid transparent; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; transition: background .15s, border-color .15s, transform .1s; }
.btn-lg { padding: 13px 22px; font-size: 1.02rem; }
.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: #0B5F58; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-link { background: transparent; color: var(--link); padding-inline: 8px; }
.btn-link:hover { text-decoration: underline; }
.btn:active { transform: translateY(1px); }

/* header */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; gap: 24px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.mark { color: var(--primary); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 1.15rem; }
.brand-text small { color: var(--muted); font-size: .72rem; letter-spacing: .04em; }
.bar nav { display: flex; gap: 20px; margin-inline-start: auto; }
.bar nav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.bar nav a:hover { color: var(--ink); }
@media (max-width: 760px) { .bar nav { display: none; } .bar .btn { margin-inline-start: auto; } }

/* sections */
.hero { padding: 72px 0 40px; }
.eyebrow { color: var(--primary); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }
.section { padding: 48px 0; }
.sub { color: var(--muted); max-width: 60ch; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
@media (max-width: 860px) { .grid3 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.card p { color: var(--muted); margin: 0; }
.card-ic, .stage-ic { color: var(--primary); background: var(--primary-soft); width: 48px; height: 48px; border-radius: 12px; margin-bottom: 14px; }
.stages { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 980px) { .stages { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stages { grid-template-columns: 1fr; } }
.stages li { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; position: relative; }
.stages p { color: var(--muted); font-size: .92rem; margin: 0; }
.note { color: var(--muted); font-size: .9rem; margin-top: 18px; }
details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px 18px; margin-bottom: 10px; }
summary { list-style: none; cursor: pointer; font-weight: 600; padding: 14px 0; display: flex; justify-content: space-between; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary .chev { transition: transform .2s; color: var(--primary); }
details[open] summary .chev { transform: rotate(180deg); }
details p { color: var(--muted); }
.site-footer { border-top: 1px solid var(--border); padding: 28px 0 100px; color: var(--muted); font-size: .9rem; }

/* launcher */
.launcher { position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 40; display: flex; align-items: center; gap: 10px; border: 0; cursor: pointer; font: inherit; font-weight: 600; color: #fff; background: var(--head); padding: 12px 18px 12px 14px; border-radius: 999px; box-shadow: var(--shadow); transition: transform .15s, opacity .2s; }
.launcher:hover { transform: translateY(-2px); }
.launcher-ic { color: #fff; }
.launcher.pulse { animation: pulse 2.2s ease-out 3; }
.launcher.hide { opacity: 0; pointer-events: none; transform: scale(.9); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .55), var(--shadow); } 70% { box-shadow: 0 0 0 16px rgba(245, 158, 11, 0), var(--shadow); } 100% { box-shadow: var(--shadow); } }
@media (max-width: 520px) { .launcher-label { display: none; } .launcher { padding: 14px; } }

/* panel */
.panel { position: fixed; top: 0; inset-inline-end: 0; bottom: 0; width: 420px; max-width: 100vw; z-index: 50; display: flex; flex-direction: column; background: var(--surface); border-inline-start: 1px solid var(--border); box-shadow: var(--shadow); transform: translateX(105%); visibility: hidden; transition: transform .22s cubic-bezier(.2, .9, .3, 1.05), visibility 0s linear .22s; }
.panel[dir="rtl"] { transform: translateX(-105%); }
.panel.open { transform: none; visibility: visible; transition-delay: 0s; }
@media (max-width: 640px) { .panel { width: 100%; border: 0; } }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; background: var(--head); color: var(--head-ink); }
.panel-head .mark { color: #5EEAD4; }
.titles { min-width: 0; flex: 1; }
.p-title { margin: 0; font-weight: 600; font-size: .98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-sub { margin: 0; font-size: .74rem; color: #AAB4C8; }
.langs { display: flex; background: rgba(255, 255, 255, .1); border-radius: 8px; padding: 2px; }
.langs button { font: inherit; font-size: .7rem; font-weight: 700; letter-spacing: .04em; color: #C9D1E2; background: transparent; border: 0; border-radius: 6px; padding: 5px 7px; cursor: pointer; }
.langs button[aria-pressed="true"] { background: var(--accent); color: #14213D; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: inherit; cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: rgba(255, 255, 255, .14); }
.icon-btn.dark { color: var(--ink); }
.icon-btn.dark:hover { background: var(--surface-2); }
.messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); overscroll-behavior: contain; }
.msg { display: flex; }
.msg.user { justify-content: flex-end; }
.bubble { max-width: 86%; padding: 10px 14px; border-radius: 12px; font-size: .94rem; overflow-wrap: anywhere; }
.msg.bot .bubble { background: var(--bubble-bot); border: 1px solid var(--border-strong); border-end-start-radius: 4px; }
.msg.user .bubble { background: var(--primary); color: #fff; border-end-end-radius: 4px; white-space: pre-wrap; }
.msg.err .bubble { border-color: var(--danger); color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.bubble p { margin: 0 0 .6em; }
.bubble p:last-child, .bubble ul:last-child, .bubble ol:last-child { margin-bottom: 0; }
.bubble ul, .bubble ol { margin: 0 0 .6em; padding-inline-start: 1.25em; }
.bubble li { margin-bottom: .25em; }
.bubble a { color: var(--link); font-weight: 600; }
.bubble code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: .88em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.chip { font: inherit; font-size: .82rem; color: var(--primary); background: transparent; border: 1.5px solid var(--primary); border-radius: 999px; padding: 7px 13px; cursor: pointer; transition: background .15s; }
.chip:hover { background: var(--primary-soft); }
.cta { margin-top: 10px; font: inherit; font-weight: 600; font-size: .9rem; display: inline-flex; align-items: center; gap: 8px; background: var(--primary); color: #fff; border: 0; border-radius: 9px; padding: 9px 14px; cursor: pointer; }
.cta:hover { background: #0B5F58; }
[dir="rtl"] .cta .ic-arrow { transform: scaleX(-1); }
.typing .bubble { display: flex; gap: 4px; align-items: flex-end; height: 38px; padding: 12px 16px; }
.typing .bar-i { width: 4px; height: 6px; border-radius: 2px; background: var(--muted); animation: rise 1s ease-in-out infinite; }
.typing .bar-i:nth-child(2) { animation-delay: .15s; } .typing .bar-i:nth-child(3) { animation-delay: .3s; }
@keyframes rise { 0%, 100% { height: 6px; opacity: .5; } 50% { height: 16px; opacity: 1; } }
.pill { position: absolute; inset-inline: 0; margin-inline: auto; width: max-content; bottom: 84px; display: flex; gap: 6px; align-items: center; font: inherit; font-size: .8rem; font-weight: 600; background: var(--head); color: #fff; border: 0; border-radius: 999px; padding: 7px 14px; cursor: pointer; box-shadow: var(--shadow); z-index: 2; }
.pill[hidden] { display: none; }
.composer { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--border); background: var(--surface); }
.composer textarea { flex: 1; resize: none; font: inherit; font-size: 16px; line-height: 1.4; color: var(--ink); background: var(--surface-2); border: 1.5px solid transparent; border-radius: 12px; padding: 10px 14px; max-height: 120px; }
.composer textarea:focus { outline: none; border-color: var(--primary); }
.composer textarea:disabled { opacity: .6; }
.round { flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; }
.round.solid { background: var(--primary); color: #fff; }
.round.solid:disabled { opacity: .4; cursor: not-allowed; }
[dir="rtl"] .round.solid .ic-send { transform: scaleX(-1); }
.round.ghost { background: var(--surface-2); color: var(--muted); }
.round.ghost:hover { color: var(--ink); }
.round.rec { background: var(--danger); color: #fff; animation: rec 1.1s ease-in-out infinite; }
.round[hidden] { display: none; }
@keyframes rec { 50% { opacity: .6; } }

/* modal */
.modal { position: fixed; inset: 0; z-index: 80; background: rgba(20, 33, 61, .55); display: grid; place-items: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-card { position: relative; width: min(480px, 100%); max-height: 94vh; overflow: auto; background: var(--surface); border-radius: 16px; padding: 26px; box-shadow: var(--shadow); }
.modal-card > .icon-btn { position: absolute; inset-inline-end: 10px; top: 10px; }
.field { display: block; font-size: .85rem; font-weight: 600; margin: 14px 0 0; }
.field input, .field textarea { display: block; width: 100%; margin-top: 6px; font: inherit; font-weight: 400; font-size: 16px; color: var(--ink); background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); }
.field.bad input { border-color: var(--danger); }
.err { display: block; color: var(--danger); font-style: normal; font-weight: 500; font-size: .8rem; margin-top: 4px; min-height: 0; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { color: var(--danger); font-weight: 600; margin: 14px 0 0; }
.form-error[hidden] { display: none; }
.privacy { font-size: .8rem; color: var(--muted); margin: 14px 0 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.success { text-align: center; padding: 16px 0 4px; }
.success[hidden], #lead-form[hidden] { display: none; }
.success .ok { color: var(--primary); margin-bottom: 8px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
