:root {
  color-scheme: light;
  --ink: #10221c;
  --muted: #66736e;
  --line: #dfe8e3;
  --paper: #f8fbf9;
  --white: #ffffff;
  --mint: #dff7e9;
  --signal: #1c8c58;
  --signal-dark: #12633e;
  --amber: #fff1c7;
  --rose: #ffe2dd;
  --blue: #e4efff;
  --shadow: 0 20px 60px rgba(29, 61, 48, .11);
  --radius: 18px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 85% 0%, #e8f8ef 0, transparent 32rem), var(--paper); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid rgba(28, 140, 88, .3); outline-offset: 2px; }

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr); }
.login-story { padding: clamp(40px, 7vw, 96px); display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -.03em; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--ink); color: white; font-size: 14px; }
.eyebrow { text-transform: uppercase; letter-spacing: .13em; font-size: 11px; font-weight: 800; color: var(--signal-dark); }
.hero-title { max-width: 760px; margin: 24px 0 18px; font-size: clamp(46px, 6vw, 84px); line-height: .96; letter-spacing: -.06em; }
.hero-copy { max-width: 620px; font-size: clamp(18px, 2vw, 23px); line-height: 1.5; color: var(--muted); }
.proof-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 40px; }
.proof-card { padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.72); }
.proof-card b { display: block; margin-bottom: 7px; }
.proof-card span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.login-panel { display: grid; place-items: center; padding: 40px; background: rgba(255,255,255,.65); }
.login-card { width: min(440px, 100%); padding: 34px; background: var(--white); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); }
.login-card h2 { font-size: 30px; margin: 12px 0 8px; letter-spacing: -.04em; }
.login-card p { color: var(--muted); line-height: 1.5; }
.demo-credentials { background: var(--mint); padding: 13px 15px; border-radius: 12px; margin: 20px 0; font-size: 13px; line-height: 1.6; }

.field { display: grid; gap: 7px; margin-bottom: 15px; }
.field label { font-size: 12px; font-weight: 750; color: #34453e; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid #cad8d1; border-radius: 11px; padding: 12px 13px; color: var(--ink); background: white; }
.field textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.field small { color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 20px; }
.btn { border: 1px solid var(--line); border-radius: 11px; padding: 10px 15px; background: var(--white); color: var(--ink); font-weight: 750; transition: transform 160ms, background 160ms, border 160ms; }
.btn:hover { transform: translateY(-1px); border-color: #b7c9c0; }
.btn-primary { background: var(--ink); color: white; border-color: var(--ink); }
.btn-signal { background: var(--signal); color: white; border-color: var(--signal); }
.btn-quiet { padding: 7px 10px; font-size: 13px; }
.btn-danger { color: #9a2e23; }
.btn:disabled { opacity: .5; cursor: wait; transform: none; }
.btn-block { width: 100%; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { padding: 22px 16px; border-right: 1px solid var(--line); background: rgba(255,255,255,.8); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; backdrop-filter: blur(20px); z-index: 4; }
.sidebar .brand { padding: 5px 8px 22px; }
.property-switcher { border: 1px solid var(--line); background: var(--paper); border-radius: 13px; padding: 11px 12px; margin: 0 4px 22px; }
.property-switcher small { color: var(--muted); display: block; margin-bottom: 4px; }
.nav { display: grid; gap: 4px; }
.nav button { border: 0; background: transparent; padding: 10px 12px; border-radius: 10px; text-align: left; color: #53635c; font-weight: 650; display: flex; align-items: center; gap: 10px; }
.nav button:hover { background: #eef5f1; }
.nav button.active { background: var(--mint); color: var(--signal-dark); }
.nav-icon { width: 22px; text-align: center; }
.sidebar-footer { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid var(--line); }
.user-row { display: flex; align-items: center; gap: 9px; }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--ink); color: white; font-weight: 800; font-size: 12px; }
.user-row div { min-width: 0; }
.user-row b, .user-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row small { color: var(--muted); }

.main { padding: 0 clamp(22px, 4vw, 62px) 60px; min-width: 0; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.topbar .status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.status-dot { width: 8px; height: 8px; background: var(--signal); border-radius: 50%; box-shadow: 0 0 0 4px rgba(28,140,88,.12); }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-head h1 { font-size: clamp(30px, 4vw, 48px); letter-spacing: -.05em; margin: 0 0 8px; }
.page-head p { margin: 0; color: var(--muted); max-width: 650px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--white); }
.metric-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.metric-value { font-size: 34px; letter-spacing: -.05em; margin: 13px 0 3px; font-weight: 820; }
.metric-note { font-size: 12px; color: var(--signal-dark); }
.panel-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .75fr); gap: 16px; margin-top: 16px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; }
.panel-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-head h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.panel-body { padding: 20px; }
.conversation-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 20px; border-bottom: 1px solid #eef2f0; cursor: pointer; }
.conversation-row:hover { background: #f7faf8; }
.conversation-row:last-child { border-bottom: 0; }
.channel-badge { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--mint); color: var(--signal-dark); font-weight: 800; }
.conversation-meta { min-width: 0; }
.conversation-meta b { display: block; margin-bottom: 4px; }
.conversation-meta span { display: block; color: var(--muted); font-size: 13px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 99px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.pill-ai { background: var(--mint); color: var(--signal-dark); }
.pill-human { background: var(--amber); color: #785a00; }
.pill-resolved { background: #edf0ef; color: #5b6762; }
.progress { height: 9px; background: #edf2ef; border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--signal); border-radius: inherit; }
.value-stack { display: grid; gap: 18px; }
.value-row { display: grid; gap: 7px; }
.value-row div { display: flex; justify-content: space-between; font-size: 13px; }

.inbox-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); min-height: 670px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; }
.inbox-list { border-right: 1px solid var(--line); overflow: auto; }
.inbox-filter { padding: 13px; border-bottom: 1px solid var(--line); display: flex; gap: 7px; }
.filter-button { border: 1px solid var(--line); border-radius: 9px; background: white; padding: 7px 9px; font-size: 12px; font-weight: 700; }
.filter-button.active { background: var(--ink); color: white; }
.chat-view { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-width: 0; }
.chat-head { padding: 15px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.chat-head h3 { margin: 0 0 4px; }
.chat-head small { color: var(--muted); }
.chat-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.messages { padding: 24px; overflow: auto; background: linear-gradient(#fbfdfc, #f6faf8); display: flex; flex-direction: column; gap: 10px; }
.message { max-width: min(600px, 78%); padding: 11px 13px; border-radius: 14px; line-height: 1.46; font-size: 14px; }
.message-guest { align-self: flex-start; background: white; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.message-ai { align-self: flex-end; background: var(--mint); border-bottom-right-radius: 4px; }
.message-human { align-self: flex-end; background: var(--ink); color: white; border-bottom-right-radius: 4px; }
.message-system { align-self: center; background: transparent; color: var(--muted); font-size: 12px; padding: 5px; }
.message-meta { display: block; margin-top: 6px; font-size: 10px; opacity: .64; }
.composer { border-top: 1px solid var(--line); padding: 14px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.composer input { border: 1px solid #cbd8d2; border-radius: 11px; padding: 11px 13px; }
.empty-state { min-height: 280px; display: grid; place-items: center; text-align: center; padding: 40px; color: var(--muted); }

.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.notification-count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; margin-left: 4px; border-radius: 99px; background: #b83d2f; color: white; font-size: 10px; font-weight: 850; }
.notification-count.hidden { display: none; }
.notification-list { display: grid; gap: 9px; }
.notification-item { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; }
.notification-item.unread { border-color: #e4b852; background: #fffaf0; }
.notification-item p { margin: 5px 0; color: var(--muted); font-size: 13px; }
.notification-item small { color: var(--muted); }
.search { min-width: 250px; border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; background: white; }
.knowledge-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.knowledge-card { border: 1px solid var(--line); border-radius: 15px; padding: 17px; background: white; display: flex; flex-direction: column; min-height: 210px; }
.knowledge-card h3 { font-size: 16px; margin: 14px 0 9px; }
.knowledge-card p { color: var(--muted); line-height: 1.5; font-size: 13px; margin: 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.knowledge-card footer { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 15px; }
.category { font-size: 10px; text-transform: uppercase; letter-spacing: .1em; color: var(--signal-dark); font-weight: 850; }

.journey { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(0, 1.28fr); gap: 16px; }
.rules { display: grid; gap: 10px; }
.rule-card { border: 1px solid var(--line); border-radius: 14px; padding: 15px; background: white; display: grid; grid-template-columns: auto 1fr; gap: 12px; }
.rule-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--blue); }
.rule-card h3 { margin: 0 0 5px; font-size: 15px; }
.rule-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.switch { margin-left: auto; }
.schedule-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; padding: 13px 20px; border-bottom: 1px solid #eef2f0; align-items: center; font-size: 13px; }
.schedule-row:last-child { border-bottom: 0; }

.onboarding-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, .7fr); gap: 16px; }
.steps { display: grid; gap: 10px; }
.step { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; }
.step-number { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: white; font-weight: 800; font-size: 12px; }
.step h3 { margin: 2px 0 5px; font-size: 14px; }
.step p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.integration-row { display: flex; justify-content: space-between; gap: 20px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.integration-row:last-child { border-bottom: 0; }
.integration-row b, .integration-row small { display: block; }
.integration-row small { color: var(--muted); margin-top: 4px; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(9,25,19,.48); display: grid; place-items: center; padding: 20px; z-index: 20; }
.modal { width: min(620px, 100%); max-height: 90vh; overflow: auto; background: white; border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-head h2 { margin: 0; }
.icon-button { border: 0; background: #eef2f0; border-radius: 9px; width: 34px; height: 34px; }
.toast { position: fixed; right: 22px; bottom: 22px; background: var(--ink); color: white; padding: 12px 16px; border-radius: 11px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: 180ms; z-index: 30; max-width: 360px; }
.toast.show { opacity: 1; transform: translateY(0); }
.error { color: #a22f24; background: var(--rose); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.muted { color: var(--muted); }
.skeleton { height: 80px; border-radius: 14px; background: linear-gradient(90deg, #edf2ef, #f8faf9, #edf2ef); background-size: 200%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .knowledge-grid { grid-template-columns: repeat(2, 1fr); }
  .panel-grid, .journey, .onboarding-grid { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .login-page { grid-template-columns: 1fr; }
  .login-story { min-height: auto; padding: 34px 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .hero-title { font-size: 47px; }
  .proof-strip { display: none; }
  .login-panel { padding: 24px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand, .property-switcher, .sidebar-footer { display: none; }
  .nav { display: flex; overflow-x: auto; }
  .nav button { white-space: nowrap; }
  .main { padding: 0 16px 40px; }
  .topbar { height: 62px; margin-bottom: 24px; }
  .inbox-layout { grid-template-columns: 1fr; }
  .inbox-list { border-right: 0; max-height: 300px; border-bottom: 1px solid var(--line); }
  .chat-view { min-height: 600px; }
  .knowledge-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .metric-grid, .form-grid { grid-template-columns: 1fr; }
  .page-head { align-items: start; flex-direction: column; }
  .toolbar { width: 100%; }
  .search { min-width: 0; width: 100%; }
  .schedule-row { grid-template-columns: 1fr auto; }
  .schedule-row > :nth-child(2) { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }

.marketing { background: linear-gradient(180deg, #f4fbf7 0, #fff 28%, #fff 75%, #eef8f2 100%); }
.marketing-nav { width: min(1180px, calc(100% - 40px)); height: 82px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.marketing-nav nav { display: flex; gap: 26px; }
.marketing-nav nav a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 700; }
.marketing-hero { width: min(1180px, calc(100% - 40px)); margin: 74px auto 58px; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(36px, 7vw, 90px); align-items: center; }
.marketing-hero h1 { font-size: clamp(52px, 6.2vw, 86px); line-height: .95; letter-spacing: -.065em; margin: 22px 0; }
.marketing-hero p { font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 650px; }
.marketing-actions { display: flex; gap: 10px; margin: 30px 0 16px; }
.product-proof { border: 1px solid var(--line); border-radius: 22px; background: white; box-shadow: var(--shadow); overflow: hidden; transform: rotate(1deg); }
.proof-top { padding: 15px 17px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 12px; }
.proof-top i { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--signal); }
.proof-chat { padding: 24px; background: #f9fcfa; display: flex; flex-direction: column; gap: 10px; }
.proof-message { max-width: 85%; padding: 12px 14px; border-radius: 14px; line-height: 1.45; font-size: 14px; }
.proof-message.guest { background: white; border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.proof-message.answer { align-self: end; background: var(--mint); border-bottom-right-radius: 4px; }
.proof-source { align-self: end; font-size: 10px; color: var(--signal-dark); }
.proof-handoff { align-self: center; margin-top: 3px; padding: 7px 10px; border-radius: 99px; background: var(--amber); color: #785a00; font-size: 11px; font-weight: 800; }
.trust-line { border-block: 1px solid var(--line); display: flex; justify-content: center; gap: clamp(20px, 5vw, 62px); flex-wrap: wrap; padding: 20px; color: var(--muted); font-size: 12px; font-weight: 750; }
.marketing-section { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 110px 0; }
.section-copy { max-width: 720px; margin-bottom: 48px; }
.section-copy h2 { font-size: clamp(40px, 5vw, 64px); line-height: 1; letter-spacing: -.055em; margin: 18px 0; }
.section-copy p { color: var(--muted); font-size: 18px; line-height: 1.55; }
.workflow-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.workflow-grid article { min-height: 250px; padding: 24px; border-right: 1px solid var(--line); background: white; }
.workflow-grid article:last-child { border: 0; }
.workflow-grid span { color: var(--signal); font: 800 12px ui-monospace, monospace; }
.workflow-grid h3 { margin-top: 50px; }
.workflow-grid p { color: var(--muted); font-size: 14px; line-height: 1.55; }
.decision { border-top: 1px solid var(--line); }
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: stretch; }
.pricing-grid article { border: 1px solid var(--line); border-radius: 18px; padding: 25px; background: white; display: flex; flex-direction: column; }
.pricing-grid article.featured { border: 2px solid var(--ink); transform: translateY(-10px); }
.pricing-grid h3 { font-size: 21px; margin: 18px 0 4px; }
.price { font-size: 45px; font-weight: 850; letter-spacing: -.055em; margin: 12px 0; }
.price small { font-size: 14px; color: var(--muted); letter-spacing: 0; }
.pricing-grid p, .pricing-grid li, .pricing-note { color: var(--muted); font-size: 13px; line-height: 1.55; }
.pricing-grid ul { padding-left: 20px; margin-bottom: 26px; }
.pricing-grid .btn { margin-top: auto; text-align: center; text-decoration: none; }
.pricing-note { margin-top: 20px; }
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq summary { font-weight: 800; cursor: pointer; }
.faq details p { color: var(--muted); line-height: 1.55; }
.marketing-footer { width: min(1180px, calc(100% - 40px)); margin: auto; padding: 36px 0; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.marketing-footer p { color: var(--muted); font-size: 12px; }
@media (max-width: 900px) { .marketing-hero, .faq { grid-template-columns: 1fr; }.workflow-grid { grid-template-columns: repeat(2,1fr); }.workflow-grid article:nth-child(2) { border-right: 0; }.workflow-grid article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }.pricing-grid { grid-template-columns: 1fr; }.pricing-grid article.featured { transform: none; } }
@media (max-width: 620px) { .marketing-nav nav { display: none; }.marketing-hero { margin-top: 42px; }.marketing-hero h1 { font-size: 52px; }.workflow-grid { grid-template-columns: 1fr; }.workflow-grid article { border-right: 0; border-bottom: 1px solid var(--line); }.marketing-footer { flex-direction: column; align-items: start; } }

.legal-page { background: linear-gradient(180deg, #f1faf5, #fff 34rem); }
.legal-nav { width: min(920px, calc(100% - 40px)); height: 80px; margin: auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.legal-nav > a:last-child { color: var(--muted); font-size: 13px; font-weight: 700; }
.legal-content { width: min(760px, calc(100% - 40px)); margin: 70px auto 100px; }
.legal-content h1 { margin: 18px 0 34px; font-size: clamp(42px, 7vw, 70px); line-height: 1; letter-spacing: -.055em; }
.legal-content h2 { margin: 42px 0 12px; font-size: 23px; letter-spacing: -.025em; }
.legal-content p, .legal-content li { color: #4e5f57; font-size: 16px; line-height: 1.72; }
.legal-content li + li { margin-top: 7px; }
.legal-content a { color: var(--signal-dark); }
.legal-note { margin-top: 48px; padding: 16px 18px; border-radius: 12px; background: var(--amber); color: #6d5100 !important; font-size: 13px !important; }
.legal-footer { width: min(920px, calc(100% - 40px)); margin: auto; padding: 30px 0; border-top: 1px solid var(--line); display: flex; gap: 24px; }
.legal-footer a { color: var(--muted); font-size: 12px; font-weight: 700; }
