/* AssistPal public website: design system and components. No framework, no external fonts (CSP: everything from 'self'). */

:root {
  --navy: #10162a;
  --navy-2: #18233d;
  --navy-3: #22304f;
  --blue: #5369e8;
  --violet: #8663e8;
  --cyan: #36b8c8;
  --light: #f5f7fc;
  --white: #ffffff;
  --ink: #182238;
  --muted: #68748b;
  --line: #e3e8f2;
  --line-dark: rgba(255, 255, 255, 0.1);
  --on-dark: #e8ecf8;
  --on-dark-muted: #a9b3cc;
  --ok: #1f9d6b;
  --warn: #b7791f;
  --err: #d14343;
  --grad: linear-gradient(120deg, var(--blue), var(--violet));
  --grad-cyan: linear-gradient(120deg, var(--cyan), var(--blue));
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(16, 22, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(16, 22, 42, 0.16);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.65 var(--font); color: var(--ink); background: var(--light); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; color: inherit; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--white); color: var(--ink); padding: 10px 14px; border-radius: 10px; }
.skip-link:focus { left: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(1160px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 40px); margin-inline: auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.grad-text { background: var(--grad-cyan); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- buttons ---------- */
.btn { --b: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px;
  border-radius: 12px; border: 1px solid transparent; font: 600 0.98rem/1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease; color: var(--b); background: transparent; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.65; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--grad); color: var(--white); box-shadow: 0 8px 22px rgba(83, 105, 232, 0.35); }
.btn-primary:hover { box-shadow: 0 12px 30px rgba(83, 105, 232, 0.45); }
.btn-light { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-ghost { color: var(--on-dark); border-color: rgba(255, 255, 255, 0.22); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn-outline { color: var(--blue); border-color: rgba(83, 105, 232, 0.4); background: var(--white); }
.btn-lg { min-height: 52px; padding: 14px 26px; font-size: 1.05rem; border-radius: 14px; }
.btn-block { width: 100%; }
.btn .spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(16, 22, 42, 0.92); backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid var(--line-dark); color: var(--on-dark); }
.site-header .bar { height: var(--header-h); display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 36px; width: auto; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-nav a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--on-dark-muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--white); background: rgba(255, 255, 255, 0.07); }
.header-cta { display: flex; gap: 10px; }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line-dark); background: transparent; color: var(--white); cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 20px; height: 2px; background: currentColor; margin: 0 auto; position: relative; transition: transform 0.2s ease; content: ""; }
.nav-toggle span::before { position: absolute; top: -6px; } .nav-toggle span::after { position: absolute; top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .main-nav, .header-cta { display: none; }
  .nav-open .main-nav, .nav-open .header-cta { display: flex; }
  .nav-open .bar { flex-wrap: wrap; height: auto; padding: 12px 0 16px; }
  .nav-open .main-nav { order: 3; width: 100%; margin: 6px 0 0; }
  .nav-open .main-nav ul { flex-direction: column; width: 100%; }
  .nav-open .main-nav a { padding: 12px; }
  .nav-open .header-cta { order: 4; width: 100%; }
  .nav-open .header-cta .btn { flex: 1; }
}

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-dark { background: var(--navy); color: var(--on-dark); }
.section-dark .muted, .section-dark p { color: var(--on-dark-muted); }
.section-white { background: var(--white); }
.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.section-dark .section-head p { color: var(--on-dark-muted); }
.eyebrow { display: inline-block; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); margin-bottom: 10px; }
.section-dark .eyebrow, .hero .eyebrow { color: var(--cyan); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--navy); color: var(--white); padding: clamp(64px, 10vw, 128px) 0 clamp(64px, 9vw, 112px); isolation: isolate; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: 0.55; animation: drift 18s ease-in-out infinite alternate; }
.hero::before { width: 520px; height: 520px; background: var(--violet); top: -180px; right: -120px; }
.hero::after { width: 460px; height: 460px; background: var(--blue); bottom: -220px; left: -140px; animation-delay: -6s; }
@keyframes drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(40px, 30px) scale(1.12); } }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero .lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--on-dark); opacity: 0.9; max-width: 600px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: 0.9rem; color: var(--on-dark-muted); }
.hero-visual { position: relative; display: grid; place-items: center; }
.hero-visual .halo { position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle, rgba(54, 184, 200, 0.35), transparent 65%); }
.hero-visual img.mark { position: relative; width: min(420px, 100%); filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.45)); animation: floaty 6s ease-in-out infinite; }
.hero-visual img.bot { position: relative; z-index: 1; width: min(420px, 100%); height: auto; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.5)); }
.hero-visual .orbit { position: absolute; width: 88%; aspect-ratio: 1; border-radius: 50%; border: 1px dashed rgba(255, 255, 255, 0.16); animation: spin 50s linear infinite; }
.hero-visual .orbit::after { content: ""; position: absolute; inset: 14%; border-radius: 50%; border: 1px solid rgba(127, 227, 240, 0.18); }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-chip { position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3); animation: floaty 7s ease-in-out infinite; }
.hero-chip i { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-size: 15px; color: #3fcf8e; background: rgba(63, 207, 142, 0.18); }
.hero-chip.c2 i { color: #f2b45a; background: rgba(242, 180, 90, 0.18); }
.hero-chip b { display: block; font-size: 0.9rem; color: var(--white); } .hero-chip small { font-size: 0.78rem; color: var(--on-dark-muted); }
.hero-chip.c1 { left: -4%; bottom: 14%; } .hero-chip.c2 { right: -2%; top: 10%; animation-delay: -3s; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.page-hero { padding: clamp(56px, 8vw, 96px) 0 clamp(44px, 6vw, 72px); }
.page-hero h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
.page-hero.center .lead, .page-hero .center .lead { margin-inline: auto; }
.page-hero.center .hero-actions { justify-content: center; }

/* chat preview card in the hero */
.chat-card { position: relative; width: min(400px, 100%); background: rgba(24, 35, 61, 0.78); border: 1px solid var(--line-dark); border-radius: 22px; padding: 18px;
  box-shadow: var(--shadow-lg); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.chat-card .who { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-weight: 700; }
.chat-card .who img { width: 46px; height: auto; }
.chat-card .who small { display: block; font-weight: 500; color: var(--on-dark-muted); }
.bubble { border-radius: 16px; padding: 10px 14px; margin: 8px 0; font-size: 0.95rem; max-width: 88%; }
.bubble.me { margin-left: auto; background: var(--grad); color: var(--white); border-bottom-right-radius: 6px; }
.bubble.bot { background: rgba(255, 255, 255, 0.08); color: var(--on-dark); border-bottom-left-radius: 6px; }
.chat-card .note { margin: 10px 0 0; font-size: 0.78rem; color: var(--on-dark-muted); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .hero-visual img.mark { width: 220px; }
  .hero-visual img.bot { width: 260px; }
  .hero-chip { display: none; }
}

/* ---------- grids & cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 980px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(83, 105, 232, 0.35); }
.card p:last-child { margin-bottom: 0; }
.card .icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(83, 105, 232, 0.1); color: var(--blue); margin-bottom: 16px; }
.card .icon svg { width: 24px; height: 24px; }
.section-dark .card { background: var(--navy-2); border-color: var(--line-dark); box-shadow: none; color: var(--on-dark); }
.section-dark .card .icon { background: rgba(54, 184, 200, 0.14); color: var(--cyan); }
.card-mascot { display: flex; gap: 18px; align-items: flex-start; }
.avatar { flex: none; width: 72px; height: 72px; border-radius: 22px; background: #eef1fb; display: grid; place-items: center; overflow: hidden; }
.avatar img { width: 64px; height: 64px; object-fit: contain; }
.ticks { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.45em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--grad-cyan); }
.ticks li::after { content: ""; position: absolute; left: 5px; top: calc(0.45em + 4px); width: 6px; height: 3.5px; border: 2px solid var(--white); border-top: 0; border-right: 0; transform: rotate(-45deg); }
.ticks li.soon::before { background: #cfd6e6; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.02em; vertical-align: middle; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-live { color: var(--ok); background: rgba(31, 157, 107, 0.12); }
.badge-soon { color: var(--warn); background: rgba(183, 121, 31, 0.14); }
.badge-beta { color: var(--blue); background: rgba(83, 105, 232, 0.12); }
.section-dark .badge-live { color: #4fd1a1; background: rgba(79, 209, 161, 0.14); }
.section-dark .badge-soon { color: #f2b45a; background: rgba(242, 180, 90, 0.14); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: -20px 0 36px; font-size: 0.92rem; color: var(--muted); }

/* ---------- feature rows ---------- */
.feature-block { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: start; padding: 36px 0; border-top: 1px solid var(--line); }
.feature-block:first-of-type { border-top: 0; }
.feature-block .intro h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.feature-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; }
.feature-item h3 { font-size: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.feature-item p { margin: 0; color: var(--muted); font-size: 0.95rem; }
@media (max-width: 860px) { .feature-block { grid-template-columns: 1fr; gap: 20px; } }
@media (max-width: 560px) { .feature-list { grid-template-columns: 1fr; } }

/* ---------- steps ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.step { position: relative; padding: 24px; border-radius: var(--radius); background: var(--navy-2); border: 1px solid var(--line-dark); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--grad); color: var(--white); font-weight: 800; margin-bottom: 14px; }
.step h3 { color: var(--white); }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

/* ---------- workflow demo ---------- */
.demo { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.demo-panel { background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); padding: 22px; box-shadow: var(--shadow); }
.demo-panel .row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); margin-top: 10px; background: var(--light); }
.demo-panel .row b { display: block; font-size: 0.95rem; }
.demo-panel .row small { color: var(--muted); }
.demo-panel .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.high { background: var(--err); } .dot.med { background: var(--warn); } .dot.cal { background: var(--blue); }
@media (max-width: 860px) { .demo { grid-template-columns: 1fr; } }

/* ---------- pricing ---------- */
.plans { align-items: stretch; }
.plan { display: flex; flex-direction: column; position: relative; }
.plan.featured { border-color: transparent; background: linear-gradient(var(--white), var(--white)) padding-box, var(--grad) border-box; border: 2px solid transparent; }
.plan .tag { position: absolute; top: -12px; left: 24px; background: var(--grad); color: var(--white); font-size: 0.75rem; font-weight: 800; padding: 4px 12px; border-radius: 999px; }
.plan .price { font-size: 1.25rem; font-weight: 800; margin: 4px 0 2px; }
.plan .price small { display: block; font-size: 0.85rem; font-weight: 500; color: var(--muted); }
.plan dl { margin: 16px 0 0; font-size: 0.92rem; }
.plan dt { font-weight: 700; margin-top: 12px; }
.plan dd { margin: 2px 0 0; color: var(--muted); }
.plan .btn { margin-top: auto; }
.plan .cta-wrap { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; }
.plan .cta-wrap .btn { flex: 1; }
.note-box { margin-top: 30px; padding: 18px 20px; border-radius: var(--radius-sm); background: rgba(83, 105, 232, 0.07); border: 1px solid rgba(83, 105, 232, 0.2); font-size: 0.95rem; }
.compare { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: 0.95rem; }
.compare th, .compare td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.compare thead th { background: var(--navy); color: var(--white); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }

/* ---------- FAQ ---------- */
.faq-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.faq-tools input { flex: 1 1 280px; }
.faq-cats { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: var(--white); border-radius: 999px; padding: 8px 14px; font: 600 0.88rem var(--font); color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.faq-group { margin-bottom: 30px; }
.faq-group h2 { font-size: 1.3rem; margin-bottom: 12px; }
details.qa { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 10px; }
details.qa summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font-weight: 700; position: relative; }
details.qa summary::-webkit-details-marker { display: none; }
details.qa summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--blue); transition: transform 0.2s ease; }
details.qa[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details.qa .answer { padding: 0 18px 16px; color: var(--muted); }
details.qa .answer p:last-child { margin: 0; }
.faq-empty { display: none; padding: 20px; text-align: center; color: var(--muted); }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field label { display: block; font-weight: 600; font-size: 0.93rem; margin-bottom: 6px; }
.field .opt { font-weight: 500; color: var(--muted); }
.input, textarea.input, select.input { width: 100%; min-height: 46px; padding: 11px 14px; border-radius: 12px; border: 1px solid #cdd5e4; background: var(--white);
  font: 1rem/1.4 var(--font); color: var(--ink); transition: border-color 0.15s ease, box-shadow 0.15s ease; }
textarea.input { min-height: 140px; resize: vertical; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(83, 105, 232, 0.16); }
.input[aria-invalid="true"] { border-color: var(--err); }
.field .hint { font-size: 0.85rem; color: var(--muted); margin-top: 6px; }
.field .error { font-size: 0.86rem; color: var(--err); margin-top: 6px; min-height: 0; }
.field .error:empty { display: none; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 76px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--blue); font: 600 0.85rem var(--font); padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.93rem; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--blue); flex: none; }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 0.95rem; border: 1px solid; }
.alert:empty { display: none; }
.alert-ok { color: #12643f; background: #e7f7ef; border-color: #b7e6cf; }
.alert-err { color: #9b2c2c; background: #fdeeee; border-color: #f5c2c2; }
.alert-info { color: #2b3a8c; background: #eef1ff; border-color: #cfd6ff; }
.strength { height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 8px; }
.strength i { display: block; height: 100%; width: 0; background: var(--err); transition: width 0.25s ease, background 0.25s ease; }
.captcha { display: grid; grid-template-columns: 170px 44px 1fr; gap: 10px; align-items: center; }
.captcha .pic { height: 56px; border-radius: 12px; border: 1px solid var(--line); background: var(--white); display: grid; place-items: center; overflow: hidden; font-size: 0.8rem; color: var(--muted); }
.captcha .pic img { width: 160px; height: 56px; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--white); cursor: pointer; font-size: 1.1rem; color: var(--ink); }
@media (max-width: 420px) { .captcha { grid-template-columns: 1fr 44px; } .captcha .input { grid-column: 1 / -1; } }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

.contact-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- auth layout ---------- */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 48px 20px 120px;
  background: radial-gradient(circle at 15% 10%, rgba(134, 99, 232, 0.16), transparent 40%), radial-gradient(circle at 85% 90%, rgba(54, 184, 200, 0.16), transparent 40%), var(--light); }
.auth-card { width: min(460px, 100%); background: var(--white); border: 1px solid var(--line); border-radius: 24px; padding: clamp(24px, 4vw, 36px); box-shadow: var(--shadow-lg); }
.auth-card h1 { font-size: 1.75rem; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 22px; }
.auth-card .foot { margin-top: 20px; text-align: center; font-size: 0.95rem; color: var(--muted); }
.auth-mascot { width: 96px; margin: 0 auto 10px; display: grid; place-items: center; }
.auth-mascot img { width: 92px; height: auto; filter: drop-shadow(0 10px 16px rgba(83, 105, 232, 0.3)); }

/* forms switched with the hidden attribute (sign-in / two-factor) must really hide: .form sets display:grid */
.form[hidden] { display: none; }

/* ---------- split sign-in: brand panel + card ---------- */
.auth-split { padding: 40px 20px 110px; }
.auth-shell { width: min(1040px, 100%); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 460px); background: var(--white); border: 1px solid var(--line);
  border-radius: 28px; box-shadow: var(--shadow-lg); overflow: hidden; animation: authIn .5s cubic-bezier(.2, .7, .2, 1) both; }
.auth-split .auth-card { width: 100%; border: 0; border-radius: 0; box-shadow: none; padding: clamp(28px, 4vw, 44px); display: flex; flex-direction: column; justify-content: center; }
.auth-aside { position: relative; overflow: hidden; color: var(--on-dark); padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; gap: 18px;
  background: radial-gradient(circle at 20% 0%, rgba(134, 99, 232, .45), transparent 55%), radial-gradient(circle at 100% 100%, rgba(54, 184, 200, .35), transparent 50%), var(--navy); }
.aa-glow { position: absolute; right: -80px; bottom: -120px; width: 320px; height: 320px; border-radius: 50%; background: var(--grad); filter: blur(90px); opacity: .35; pointer-events: none; }
.aa-kicker { align-self: flex-start; font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 6px 12px; border-radius: 99px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line-dark); }
.auth-aside h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); font-weight: 800; color: #fff; margin: 0; }
.aa-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.aa-points li { display: flex; align-items: center; gap: 10px; }
.aa-points span { width: 24px; height: 24px; flex: none; border-radius: 8px; display: grid; place-items: center; background: rgba(54, 184, 200, .18); color: var(--cyan); }
.aa-points svg, .aa-safe svg { width: 15px; height: 15px; }
.aa-bot { margin-top: auto; display: grid; place-items: center; position: relative; }
.aa-bot::before { content: ""; position: absolute; bottom: 4px; width: 60%; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .35); filter: blur(10px); animation: aaShadow 4s ease-in-out infinite; }
.aa-bot img { position: relative; width: min(280px, 80%); height: auto; filter: drop-shadow(0 18px 30px rgba(83, 105, 232, .45)); animation: aaFloat 4s ease-in-out infinite; }
.aa-safe { display: flex; align-items: center; gap: 10px; margin: 0; font-size: .85rem; color: var(--on-dark-muted); padding-top: 14px; border-top: 1px solid var(--line-dark); }
.aa-safe span { color: var(--cyan); display: grid; }
.auth-split .auth-head { margin-bottom: 18px; }
.auth-split .auth-mascot { display: none; }
.auth-split .auth-card h1 { font-size: 1.9rem; }
.auth-split .auth-card .sub { margin-bottom: 0; }
.auth-split .alert { margin-bottom: 16px; }
.link-sm { font-size: .88rem; font-weight: 600; text-decoration: none; }
.link-sm:hover { text-decoration: underline; }
.in-ic { position: relative; }
.in-ic > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; transition: color .15s; }
.in-ic .input { padding-left: 44px; }
.in-ic:focus-within > svg { color: var(--blue); }
.auth-split .captcha { grid-template-columns: 150px 44px 1fr; }
.auth-split .captcha .pic { background: var(--light); }
.mfa-note { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: rgba(83, 105, 232, .08); border: 1px solid rgba(83, 105, 232, .2); }
.mfa-note span { width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--grad); color: #fff; }
.mfa-note svg { width: 18px; height: 18px; }
.mfa-note p { margin: 0; color: var(--ink); font-size: .93rem; }
.auth-split .auth-card .center:not(h1):not(.sub) { text-align: center; }
.auth-split #account-loading { text-align: left; }
.auth-split .strength { margin-top: 8px; }
.input.otp { font-size: 1.4rem; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
@keyframes authIn { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes aaFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes aaShadow { 0%, 100% { transform: scaleX(1); opacity: .9; } 50% { transform: scaleX(.8); opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .auth-shell, .aa-bot img, .aa-bot::before { animation: none; } }
@media (max-width: 860px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr); max-width: 480px; }
  .auth-aside { display: none; }
  .auth-split .auth-mascot { display: grid; margin: 0 0 8px; }
}
@media (max-width: 420px) { .auth-split .captcha { grid-template-columns: 1fr 44px; } }
.split { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.account-grid { display: grid; gap: 12px; margin: 18px 0; }
.account-grid div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--light); font-size: 0.95rem; }
.account-grid span { color: var(--muted); }

/* ---------- legal ---------- */
.legal { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 44px; align-items: start; }
.legal-body { min-width: 0; } /* a wide table scrolls inside its box instead of widening the page */
.legal-toc { position: sticky; top: calc(var(--header-h) + 20px); font-size: 0.9rem; }
.legal-toc ol { padding-left: 18px; margin: 8px 0 0; display: grid; gap: 6px; }
.legal-toc a { color: var(--muted); text-decoration: none; }
.legal-toc a:hover { color: var(--blue); }
.legal-body { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 44px); }
.legal-body h2 { font-size: 1.35rem; margin-top: 1.8em; padding-top: 0.4em; }
.legal-body h2:first-of-type { margin-top: 0.4em; }
.legal-body li { margin-bottom: 6px; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 0.9rem; color: var(--muted); margin-bottom: 18px; }
.draft-banner { border: 1px dashed var(--warn); background: #fff8eb; color: #7a4d0b; border-radius: 12px; padding: 14px 16px; font-size: 0.93rem; margin-bottom: 26px; }
mark.ph { background: #fff1c7; color: #6b4a00; padding: 0 4px; border-radius: 4px; font-weight: 600; }
@media (max-width: 900px) { .legal { grid-template-columns: minmax(0, 1fr); } .legal-toc { position: static; } }

/* ---------- CTA band & footer ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: 28px; padding: clamp(36px, 6vw, 64px); background: var(--navy); color: var(--white); text-align: center; isolation: isolate; }
.cta-band::before { content: ""; position: absolute; inset: -40%; z-index: -1; background: conic-gradient(from 180deg, rgba(83, 105, 232, 0.5), rgba(134, 99, 232, 0.4), rgba(54, 184, 200, 0.45), rgba(83, 105, 232, 0.5)); filter: blur(60px); animation: rotate 24s linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }
.cta-band p { color: var(--on-dark); max-width: 620px; margin-inline: auto; }
.cta-band .hero-actions { justify-content: center; }
.site-footer { background: var(--navy); color: var(--on-dark-muted); padding: 64px 0 36px; margin-top: 0; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 32px; }
.site-footer h2 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--white); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer a { color: var(--on-dark-muted); text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.footer-brand img { height: 34px; width: auto; margin-bottom: 14px; }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line-dark); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; font-size: 0.88rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ---------- scroll reveal (only when JS runs and motion is welcome) ---------- */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal-d1 { transition-delay: 0.08s; } .js .reveal-d2 { transition-delay: 0.16s; } .js .reveal-d3 { transition-delay: 0.24s; }

/* ---------- floating AssistPal bot ---------- */
.apbot-launcher { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 60;
  width: 92px; height: 84px; border-radius: 28px; border: 0; padding: 0; cursor: pointer; background: transparent;
  filter: drop-shadow(0 12px 18px rgba(16, 22, 42, 0.35)); animation: floaty 4.5s ease-in-out infinite; }
.apbot-launcher::before { content: ""; position: absolute; inset: -8px; border-radius: 50%; background: radial-gradient(circle, rgba(54, 184, 200, 0.45), transparent 70%); z-index: -1; animation: glow 3s ease-in-out infinite; }
@keyframes glow { 0%, 100% { opacity: 0.35; transform: scale(0.95); } 50% { opacity: 0.9; transform: scale(1.08); } }
.apbot-launcher img { width: 80px; height: auto; display: block; margin: 0 auto; }
.apbot-launcher .hello { position: absolute; right: 92px; bottom: 26px; white-space: nowrap; background: var(--white); color: var(--ink); font: 600 0.88rem var(--font);
  padding: 8px 12px; border-radius: 12px 12px 4px 12px; box-shadow: var(--shadow); opacity: 0; transform: translateX(8px); transition: opacity 0.3s, transform 0.3s; pointer-events: none; }
.apbot-launcher:hover .hello, .apbot-launcher.greet .hello { opacity: 1; transform: none; }
.apbot-open .apbot-launcher { animation: none; transform: scale(0.9); }
.apbot-panel { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: calc(max(18px, env(safe-area-inset-bottom)) + 96px); z-index: 61;
  width: min(390px, calc(100vw - 36px)); height: min(600px, calc(100vh - 140px)); display: flex; flex-direction: column; background: var(--white);
  border-radius: 22px; box-shadow: 0 30px 80px rgba(16, 22, 42, 0.35); overflow: hidden; border: 1px solid var(--line);
  transform-origin: bottom right; transition: opacity 0.22s ease, transform 0.22s ease; }
.apbot-panel[hidden] { display: flex; opacity: 0; transform: translateY(14px) scale(0.96); pointer-events: none; visibility: hidden; }
.apbot-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--navy); color: var(--white); }
.apbot-head img { width: 48px; height: auto; }
.apbot-head b { display: block; }
.apbot-head small { color: var(--on-dark-muted); display: flex; align-items: center; gap: 6px; }
.apbot-head small::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #4fd1a1; }
.apbot-head small.off::before { background: #f2b45a; }
.apbot-head .tools { margin-left: auto; display: flex; gap: 4px; }
.apbot-head button { width: 36px; height: 36px; border-radius: 10px; border: 0; background: rgba(255, 255, 255, 0.08); color: var(--white); cursor: pointer; font: 600 0.8rem var(--font); }
.apbot-head button:hover { background: rgba(255, 255, 255, 0.16); }
.apbot-log { flex: 1; overflow-y: auto; padding: 16px; background: var(--light); display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; }
.apbot-msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 0.94rem; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; margin: 4px 0; }
.apbot-msg.bot { background: var(--white); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.apbot-msg.me { margin-left: auto; background: var(--grad); color: var(--white); border-bottom-right-radius: 6px; }
.apbot-msg.err { background: #fdeeee; border: 1px solid #f5c2c2; color: #9b2c2c; }
.apbot-msg.sys { align-self: center; background: transparent; color: var(--muted); font-size: 0.8rem; text-align: center; padding: 4px; }
.apbot-typing { display: inline-flex; gap: 4px; padding: 12px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; border-bottom-left-radius: 6px; width: fit-content; }
.apbot-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite ease-in-out; }
.apbot-typing i:nth-child(2) { animation-delay: 0.15s; } .apbot-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.apbot-suggest { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; background: var(--light); }
.apbot-suggest button { border: 1px solid rgba(83, 105, 232, 0.35); color: var(--blue); background: var(--white); border-radius: 999px; padding: 6px 11px; font: 600 0.8rem var(--font); cursor: pointer; }
.apbot-suggest button:hover { background: rgba(83, 105, 232, 0.08); }
.apbot-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--white); }
.apbot-form textarea { flex: 1; resize: none; min-height: 44px; max-height: 120px; padding: 11px 12px; border-radius: 12px; border: 1px solid #cdd5e4; font: 0.95rem/1.4 var(--font); color: var(--ink); }
.apbot-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(83, 105, 232, 0.16); }
.apbot-form button { width: 46px; border-radius: 12px; border: 0; background: var(--grad); color: var(--white); cursor: pointer; display: grid; place-items: center; }
.apbot-form button[disabled] { opacity: 0.5; cursor: not-allowed; }
.apbot-foot { padding: 0 14px 10px; font-size: 0.72rem; color: var(--muted); background: var(--white); }
@media (max-width: 560px) {
  .apbot-panel { right: 0; left: 0; bottom: 0; width: 100%; height: min(86vh, 100%); border-radius: 22px 22px 0 0; }
  .apbot-open .apbot-launcher { display: none; }
  body { padding-bottom: 92px; } /* the launcher never covers the last controls of a page */
}

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 60px 20px; }
.notfound img { width: 120px; margin: 0 auto 20px; border-radius: 30px; background: #eef1fb; padding: 10px; }

.legal-meta { align-items: center; }
.print-btn { margin-left: auto; min-height: 38px; padding: 8px 14px; font-size: 0.9rem; }

/* ---------- print: just the document (legal pages and any other page) ---------- */
@media print {
  @page { margin: 16mm 14mm; }
  body { background: #fff; color: #000; font-size: 11pt; line-height: 1.5; padding: 0 !important; }
  .site-header, .site-footer, .skip-link, .legal-toc, .print-btn, .apbot-launcher, .apbot-panel, .cta-band, .nav-toggle { display: none !important; }
  .hero, .page-hero { background: none !important; color: #000 !important; padding: 0 0 12pt !important; }
  .hero::before, .hero::after { display: none !important; }
  .hero .lead, .hero .eyebrow { color: #333 !important; }
  .section { padding: 0 !important; }
  .container, .narrow { width: 100% !important; }
  .legal { display: block; }
  .legal-body { border: 0; padding: 0; box-shadow: none; }
  .legal-body h2 { break-after: avoid; page-break-after: avoid; margin-top: 14pt; }
  .legal-body p, .legal-body li, .compare tr { break-inside: avoid; page-break-inside: avoid; }
  .legal-meta { color: #333; }
  .compare { box-shadow: none; border: 1px solid #999; }
  .compare thead th { background: #eee !important; color: #000 !important; }
  .compare th, .compare td { border-color: #bbb; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
  a { color: #000; text-decoration: underline; }
  .legal-body a[href^="http"]::after, .legal-body a[href^="mailto:"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; word-break: break-all; }
  .legal-body a[href^="mailto:"]::after { content: ""; }
}

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