/* Kalenix Feature Library — light Kalenix brand (kalenix/brand/design-tokens.json) */
@font-face { font-family: Outfit; src: url(assets/fonts/Outfit.ttf) format("truetype"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Figtree; src: url(assets/fonts/Figtree.ttf) format("truetype"); font-weight: 300 900; font-display: swap; }

:root {
  --paper: #F5FAF9; --card: #FFFFFF; --wash: #E9FBF5; --ink: #102932; --charcoal: #1D2327;
  --mint: #73FFB0; --mint-bright: #0ED894; --mint-deep: #0E4E3F; --action: #087A58;
  --border: #DAE3E7; --muted: #5C707A; --cobalt: #1F5AFF; --coral: #FF6647;
  --r-btn: 12px; --r-card: 14px; --r-feature: 24px;
  --shadow: 0 1px 2px rgba(16,41,50,.04), 0 8px 24px rgba(16,41,50,.06);
  --shadow-lift: 0 2px 4px rgba(16,41,50,.05), 0 16px 40px rgba(16,41,50,.10);
  --ease: cubic-bezier(.2,.7,.2,1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: light; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 Figtree, system-ui, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: Outfit, system-ui, sans-serif; color: var(--charcoal); line-height: 1.15; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 700; }
h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 650; }
p { margin: 0 0 1em; }
a { color: var(--action); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; border-radius: 6px; }
.hl { background: linear-gradient(transparent 58%, var(--mint) 58%, var(--mint) 92%, transparent 92%); padding: 0 .08em; }
.wrap { width: min(1120px, 100% - 40px); margin: 0 auto; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: rgba(245,250,249,.85); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid rgba(218,227,231,.7); }
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--charcoal); font: 700 20px Outfit, sans-serif; }
.brand img { height: 30px; width: auto; }
.brand small { font: 500 13px Figtree, sans-serif; color: var(--muted); padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--border); }
.top nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.top nav a { text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; padding: 8px 12px; border-radius: 10px; }
.top nav a:hover { background: var(--wash); }

/* Buttons & chips */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: var(--r-btn); padding: 11px 18px; font-weight: 650; text-decoration: none; transition: transform .16s var(--ease), box-shadow .16s var(--ease), background .16s; }
.btn-primary { background: var(--action); color: #fff; }
.btn-primary:hover { background: var(--mint-deep); }
.btn-ghost { background: var(--card); color: var(--charcoal); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--mint-bright); }
.btn:disabled { opacity: .4; cursor: default; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--card); color: var(--ink); border-radius: 999px; padding: 7px 14px; font-size: 14px; font-weight: 600; transition: border-color .16s, background .16s; }
.chip:hover { border-color: var(--mint-bright); background: var(--wash); }
.chip[aria-pressed="true"], .chip.on { background: var(--charcoal); color: #fff; border-color: var(--charcoal); }
.tag { display: inline-block; font: 600 12px Figtree, sans-serif; letter-spacing: .04em; text-transform: uppercase; color: var(--mint-deep); background: var(--wash); border-radius: 999px; padding: 4px 10px; }
.tag.soon { color: var(--muted); background: #EEF3F5; }
.tag.sample { color: #8a4b00; background: #FFF1DC; }

/* Hero */
.hero { position: relative; padding: 72px 0 40px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 640px; height: 640px; border-radius: 50%; background: radial-gradient(circle, rgba(115,255,176,.35), rgba(115,255,176,0) 65%); pointer-events: none; }
.hero .lead { font-size: 19px; color: var(--muted); max-width: 640px; }
.dots { position: absolute; right: 6%; top: 60px; width: 260px; height: 200px; opacity: .55; pointer-events: none; background-image: radial-gradient(var(--mint-bright) 1.4px, transparent 1.6px); background-size: 18px 18px; mask-image: radial-gradient(circle at 60% 40%, #000 30%, transparent 70%); }

/* Finder */
.finder { position: relative; margin-top: 28px; max-width: 720px; }
.finder label { font: 650 15px Outfit, sans-serif; color: var(--charcoal); display: block; margin-bottom: 8px; }
.search { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 6px 6px 6px 18px; box-shadow: var(--shadow); transition: border-color .16s, box-shadow .16s; }
.search:focus-within { border-color: var(--mint-bright); box-shadow: 0 0 0 4px rgba(115,255,176,.35), var(--shadow); }
.search input { flex: 1; border: 0; outline: 0; font: 500 17px Figtree, sans-serif; color: var(--ink); background: transparent; padding: 10px 0; min-width: 0; }
.search .pre { font: 650 17px Outfit, sans-serif; color: var(--muted); white-space: nowrap; }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.results { margin-top: 14px; display: grid; gap: 8px; }
.result { display: flex; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 12px 16px; text-decoration: none; color: var(--ink); transition: border-color .16s, transform .16s var(--ease); }
.result:hover { border-color: var(--mint-bright); transform: translateY(-1px); }
.result b { font-family: Outfit, sans-serif; color: var(--charcoal); }
.result span { color: var(--muted); font-size: 14px; display: block; }
.result .arrow { margin-left: auto; color: var(--action); font-weight: 700; }
.empty { color: var(--muted); padding: 8px 2px; }

/* Grids & cards */
section.block { padding: 36px 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-feature); padding: 22px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 8px; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
a.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--mint-bright); }
.card .ico { width: 44px; height: 44px; border-radius: 14px; background: var(--wash); display: grid; place-items: center; color: var(--mint-deep); }
.card .ico svg { width: 24px; height: 24px; }
.card h3 { margin: 4px 0 0; }
.card p { color: var(--muted); margin: 0; font-size: 15px; }
.card .foot { margin-top: auto; padding-top: 8px; display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 650; color: var(--action); }
.card.dim { opacity: .62; box-shadow: none; }

/* Breadcrumb */
.crumbs { font-size: 14px; color: var(--muted); margin: 24px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--action); }

/* Feature page */
.feature-hero { padding: 28px 0 8px; display: grid; gap: 28px; grid-template-columns: 1.15fr .85fr; align-items: start; }
.feature-hero.solo { grid-template-columns: minmax(0, 760px); }
.feature-hero .lead { font-size: 19px; color: var(--muted); }
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.plain { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.plain li { display: flex; gap: 12px; align-items: flex-start; }
.plain li::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 8px; border-radius: 50%; background: var(--mint-bright); box-shadow: 0 0 0 4px rgba(115,255,176,.35); }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-feature); box-shadow: var(--shadow); padding: 22px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-title h3 { margin: 0; font-size: 17px; }
.section-title { display: flex; align-items: baseline; gap: 12px; margin: 0 0 16px; }
.section-title h2 { margin: 0; }

/* Demo: conversation */
.convo { display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 15px; line-height: 1.45; animation: rise .36s var(--ease) both; }
.msg small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .7; margin-bottom: 2px; }
.msg.them { align-self: flex-start; background: #EEF3F5; border-bottom-left-radius: 4px; }
.msg.ai { align-self: flex-end; background: var(--wash); border: 1px solid rgba(14,216,148,.35); border-bottom-right-radius: 4px; }
.msg.team { align-self: flex-end; background: #EAF0FF; border-bottom-right-radius: 4px; }
.msg.event { align-self: center; background: transparent; border: 1px dashed var(--border); color: var(--muted); font-size: 13px; font-weight: 600; border-radius: 999px; padding: 6px 12px; }
.convo-ctl { display: flex; gap: 8px; margin-top: 14px; align-items: center; }
.convo-ctl .count { margin-left: auto; font-size: 13px; color: var(--muted); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Choice demo */
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.choice-out { background: var(--paper); border-radius: var(--r-card); padding: 16px; border: 1px solid var(--border); animation: rise .3s var(--ease) both; }
.choice-out h4 { margin: 0 0 6px; font-size: 17px; }
.choice-out p:last-child { margin-bottom: 0; }
.flow { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 0; }
.flow li { position: relative; padding: 0 0 14px 30px; }
.flow li::before { content: ""; position: absolute; left: 6px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 3px solid var(--mint-bright); }
.flow li::after { content: ""; position: absolute; left: 11px; top: 22px; bottom: 0; width: 2px; background: var(--border); }
.flow li:last-child::after { display: none; }
.flow li:last-child { padding-bottom: 0; }

/* Step cards (screenshot walkthroughs) */
.guide .section-title { flex-wrap: wrap; }
.guide .view-toggle { margin-left: auto; font-size: 14px; padding: 8px 14px; }
.guide-intro { margin-top: -6px; }
.steps { position: relative; }
.step-track { overflow: hidden; border-radius: var(--r-feature); transition: height .35s var(--ease); }
.step-rail { display: flex; align-items: flex-start; transition: transform .45s var(--ease); }
.step { flex: 0 0 100%; min-width: 0; padding: 28px; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-feature); display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; }
.step.has-img { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
.step .num { width: 52px; height: 52px; border-radius: 16px; background: var(--charcoal); color: var(--mint); display: grid; place-items: center; font: 700 22px Outfit, sans-serif; margin-bottom: 14px; }
.step h3 { font-size: 22px; }
.step .body p { margin: 0 0 .7em; }
.step .body ul, .step .body ol { margin: 0 0 .7em; padding-left: 1.2em; }
.step .body li { margin: .25em 0; }
.step .tip { margin-top: 12px; background: var(--wash); border-radius: 12px; padding: 10px 14px; font-size: 14px; color: var(--mint-deep); }
.step .tip.warn { background: #FFF4E8; color: #7a4300; }
.step .tip b { color: var(--charcoal); }
.step .where { display: inline-block; font: 600 13px Figtree, sans-serif; color: var(--muted); background: var(--paper); border: 1px solid var(--border); border-radius: 8px; padding: 3px 8px; margin-bottom: 10px; }
.shots { display: grid; gap: 12px; }
.shot { position: relative; display: block; width: 100%; padding: 10px; border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(180deg, #F7FAFB, #EEF4F6); cursor: zoom-in; overflow: hidden; }
.shot img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: contain; border-radius: 8px; background: #fff; box-shadow: 0 1px 3px rgba(16,41,50,.12); }
.shot .zoom-hint { position: absolute; right: 16px; bottom: 16px; font: 600 12px Figtree, sans-serif; color: #fff; background: rgba(29,35,39,.78); padding: 4px 9px; border-radius: 999px; opacity: 0; transition: opacity .16s; }
.shot:hover .zoom-hint, .shot:focus-visible .zoom-hint { opacity: 1; }
.step-nav { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.step-dots { display: flex; gap: 6px; flex-wrap: wrap; max-width: 100%; }
.step-dots button { width: 22px; height: 6px; border-radius: 999px; border: 0; background: var(--border); padding: 0; transition: background .2s, width .2s; }
.step-dots button[aria-current="true"] { background: var(--mint-bright); width: 36px; }
.step-nav .count { margin-left: auto; font-size: 14px; color: var(--muted); white-space: nowrap; }
.guide.list .step-track { overflow: visible; height: auto !important; }
.guide.list .step-rail { flex-direction: column; gap: 16px; transform: none !important; }
.guide.list .step-nav { display: none; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 94vh; overflow: visible; }
.lightbox::backdrop { background: rgba(16,41,50,.82); backdrop-filter: blur(4px); }
.lightbox img { display: block; max-width: 96vw; max-height: 90vh; border-radius: 12px; background: #fff; box-shadow: 0 24px 80px rgba(0,0,0,.4); }
.lb-close { position: absolute; top: -18px; right: -18px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: var(--charcoal); font-size: 24px; line-height: 1; box-shadow: var(--shadow); }

/* Tabs (actions page) */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab-body { display: grid; gap: 24px; grid-template-columns: 1fr 1fr; }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq details { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-card); padding: 4px 18px; }
.faq summary { cursor: pointer; list-style: none; padding: 14px 0; font: 650 17px Outfit, sans-serif; color: var(--charcoal); display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--action); font-size: 22px; line-height: 1; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); }

/* Reps panel */
.reps { border: 2px dashed rgba(31,90,255,.35); background: #F6F8FF; border-radius: var(--r-feature); padding: 24px; }
.reps h2 { display: flex; align-items: center; gap: 10px; }
.reps .pitch { font: 600 20px/1.4 Outfit, sans-serif; color: var(--charcoal); background: var(--card); border-radius: var(--r-card); padding: 16px 18px; margin: 10px 0 16px; border: 1px solid var(--border); }
.reps .cols { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.reps dl { margin: 0; }
.reps dt { font-weight: 700; color: var(--charcoal); margin-top: 10px; }
.reps dd { margin: 2px 0 0; color: var(--ink); }
.copy { margin-left: auto; font: 650 14px Figtree, sans-serif; padding: 8px 14px; }
.card .foot { gap: 10px; }
.card .foot > span:last-child { white-space: nowrap; }
main:focus { outline: none; }
.reps-badge { font: 700 12px Figtree, sans-serif; letter-spacing: .05em; text-transform: uppercase; color: var(--cobalt); background: #E6ECFF; border-radius: 999px; padding: 4px 10px; }

/* Related + footer */
.related { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
footer { margin-top: 56px; border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.switch { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; color: var(--muted); font-weight: 600; }
.switch .knob { width: 38px; height: 22px; border-radius: 999px; background: var(--border); position: relative; transition: background .2s; }
.switch .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch[aria-checked="true"] .knob { background: var(--cobalt); }
.switch[aria-checked="true"] .knob::after { transform: translateX(16px); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--charcoal); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; animation: rise .24s var(--ease) both; z-index: 50; }

main section + section { border-top: 0; }
.stack > * + * { margin-top: 40px; }

@media (max-width: 860px) {
  .feature-hero, .tab-body, .reps .cols { grid-template-columns: 1fr; }
  .step, .step.has-img { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 20px; }
  .guide .view-toggle { margin-left: 0; }
  .brand small { display: none; }
  .dots { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Live demo entry points */
.live-btn { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; background: var(--action); color: #fff; border-radius: var(--r-btn); padding: 13px 20px; font-weight: 700; text-decoration: none; box-shadow: var(--shadow); }
.live-btn .play { width: 24px; height: 24px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; font-size: 10px; }
.live-btn:hover { box-shadow: var(--shadow-lift); }
.live-banner { display: flex; align-items: center; gap: 24px; justify-content: space-between; background: var(--ink); color: #fff; border-radius: var(--r-feature); padding: 26px 30px; text-decoration: none; box-shadow: var(--shadow-lift); }
.live-banner .lb-text { display: flex; flex-direction: column; gap: 6px; }
.live-banner .tag { align-self: flex-start; }
.live-banner b { font-family: Outfit, sans-serif; font-size: 24px; font-weight: 700; }
.live-banner .lb-text > span:last-child { color: #C9D6DA; }
.live-banner .live-btn { margin-top: 0; flex: none; }
@media (max-width: 760px) { .live-banner { flex-direction: column; align-items: flex-start; } }

/* How-to help: ? button on every page, home video card, video window (help.js) */
.kx-help-fab { position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--action); color: #fff; font: 700 24px Outfit, sans-serif; box-shadow: 0 6px 18px rgba(8,122,88,.35), 0 0 0 4px rgba(115,255,176,.35); display: grid; place-items: center; transition: transform .16s var(--ease), background .16s; }
.kx-help-fab:hover { transform: translateY(-2px); background: var(--mint-deep); }
body:has(#lv) .kx-help-fab { display: none; }
.kx-help-banner { width: 100%; display: flex; gap: 22px; align-items: center; text-align: left; background: var(--card); border: 1px solid var(--border); border-radius: var(--r-feature); padding: 14px; box-shadow: var(--shadow); transition: box-shadow .16s var(--ease), border-color .16s; color: inherit; }
.kx-help-banner:hover { box-shadow: var(--shadow-lift); border-color: var(--mint-bright); }
.kx-help-thumb { flex: 0 0 auto; width: min(300px, 40%); aspect-ratio: 16 / 9; border-radius: 14px; background: var(--wash) center / cover no-repeat; display: grid; place-items: center; }
.kx-help-thumb .play { width: 56px; height: 56px; border-radius: 50%; background: var(--action); color: #fff; display: grid; place-items: center; font-size: 18px; padding-left: 4px; box-shadow: 0 0 0 6px rgba(255,255,255,.75); }
.kx-help-text { display: grid; gap: 6px; }
.kx-help-text b { font: 700 22px/1.2 Outfit, sans-serif; color: var(--charcoal); }
.kx-help-text > span:last-child { color: var(--muted); }
.kx-help-text .tag { justify-self: start; }
@media (max-width: 640px) { .kx-help-banner { flex-direction: column; align-items: stretch; } .kx-help-thumb { width: 100%; } }
.kx-help-modal { position: fixed; inset: 0; z-index: 100; background: rgba(16,41,50,.55); display: grid; place-items: center; padding: 20px; }
.kx-help-card { width: min(920px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--card); border-radius: var(--r-feature); padding: 18px 20px 20px; box-shadow: var(--shadow-lift); color: var(--ink); font-family: Figtree, system-ui, sans-serif; }
.kx-help-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.kx-help-head h2 { margin: 0; font-size: 24px; }
.kx-help-x { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--charcoal); font-size: 22px; line-height: 1; }
.kx-help-x:hover { border-color: var(--mint-bright); }
.kx-help-video { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; background: #0B1215; display: block; }
.kx-help-none { background: var(--wash); border-radius: 14px; padding: 18px; margin: 0; }
.kx-help-tips { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.kx-help-tips li { background: var(--paper); border: 1px solid var(--border); border-radius: var(--r-card); padding: 12px 14px; display: grid; gap: 4px; font-size: 14px; }
.kx-help-tips b { font-family: Outfit, sans-serif; color: var(--charcoal); font-size: 15px; }
.kx-help-tips span { color: var(--muted); }
.kx-help-top { margin: 22px 0 26px; max-width: 760px; }
