/* ChatHealth public site. System fonts only: no third-party font CDN, so pages load the same in Singapore and mainland China. */
:root {
  --ink: #0b1f5c;
  --navy: #0e2a8c;
  --blue: #1342c8;
  --cyan: #2de2f0;
  --lime: #9bef4f;
  --paper: #ffffff;
  --mist: #f2f5fb;
  --line: #dbe2ef;
  --slate: #4f5b78;
  --alert: #b23a25;
  --radius: 14px;
  --wrap: 1120px;
  --display: "Avenir Next", "Avenir", "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --body: -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { font-family: var(--body); color: var(--ink); background: var(--paper); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 16px; }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.brand img { height: 30px; width: auto; }
.nav { display: flex; gap: 28px; list-style: none; }
.nav a { color: var(--slate); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--blue); padding-bottom: 4px; }
.menu-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font: inherit; color: var(--ink); cursor: pointer; }

/* Type */
h1, h2, h3 { font-family: var(--display); color: var(--ink); letter-spacing: -.02em; line-height: 1.12; }
h1 { font-size: clamp(38px, 5.4vw, 64px); font-weight: 700; }
h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; }
h3 { font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
.lead { font-size: 20px; color: var(--slate); max-width: 34em; }
.prose { max-width: 42em; }
.prose p, .prose ul, .prose ol { margin-top: 14px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.prose h2 { margin-top: 56px; font-size: 28px; }
.prose h3 { margin-top: 32px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; background: var(--blue); color: #fff; text-decoration: none; font-weight: 600; padding: 14px 22px; border-radius: 999px; font-size: 16px; }
.btn:hover { background: var(--navy); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--ink); color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* Hero: the conversation is the product, so the hero shows one. */
.hero { padding: 72px 0 88px; background: linear-gradient(180deg, var(--mist), var(--paper)); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.hero h1 { max-width: 11em; }
.hero .lead { margin-top: 22px; }
.status { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 22px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(155, 239, 79, .28); flex: none; }

.chat { background: var(--paper); border: 1px solid var(--line); border-radius: 28px; padding: 22px; box-shadow: 0 30px 60px -30px rgba(14, 42, 140, .35); display: flex; flex-direction: column; gap: 12px; max-width: 460px; justify-self: end; width: 100%; }
.chat-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 15px; }
.chat-head img { width: 28px; height: 28px; border-radius: 8px; }
.chat-head span { margin-left: auto; font-weight: 500; font-size: 13px; color: var(--slate); }
.msg { max-width: 88%; padding: 12px 15px; border-radius: 18px; font-size: 15px; line-height: 1.45; }
.msg.me { align-self: flex-end; background: var(--blue); color: #fff; border-bottom-right-radius: 6px; }
.msg.ai { align-self: flex-start; background: var(--mist); border-bottom-left-radius: 6px; }
.msg.ai b { color: var(--navy); }
.approve { align-self: stretch; border: 1.5px solid var(--navy); border-radius: 18px; padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.approve small { grid-column: 1; color: var(--slate); font-size: 13px; }
.approve strong { font-size: 15px; }
.approve .btn { grid-row: 1 / span 2; grid-column: 2; padding: 10px 16px; font-size: 14px; }
.chat .note { font-size: 12.5px; color: var(--slate); text-align: center; }

@media (prefers-reduced-motion: no-preference) {
  .chat > * { opacity: 0; transform: translateY(8px); animation: rise .5s ease forwards; }
  .chat > *:nth-child(2) { animation-delay: .35s; }
  .chat > *:nth-child(3) { animation-delay: 1.1s; }
  .chat > *:nth-child(4) { animation-delay: 1.9s; }
  .chat > *:nth-child(5) { animation-delay: 2.5s; }
  .chat > *:nth-child(6) { animation-delay: 2.9s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
}

/* Sections */
.section { padding: 96px 0; }
.section.tint { background: var(--mist); }
.section-head { max-width: 40em; margin-bottom: 48px; }
.section-head p { margin-top: 14px; color: var(--slate); font-size: 18px; }

.promise { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; border-top: 1px solid var(--line); }
.promise > div { padding: 32px 32px 32px 0; border-bottom: 1px solid var(--line); }
.promise > div:nth-child(odd) { border-right: 1px solid var(--line); }
.promise > div:nth-child(even) { padding-left: 32px; }
.promise p { margin-top: 10px; color: var(--slate); max-width: 30em; }

.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.rules p { margin-top: 10px; color: var(--slate); }
.rules h3::before { content: ""; display: block; width: 28px; height: 4px; border-radius: 2px; background: var(--blue); margin-bottom: 18px; }

.markets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.market { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; background: var(--paper); }
.market .when { font-family: var(--display); font-size: 30px; font-weight: 700; color: var(--navy); margin-top: 8px; }
.market p { color: var(--slate); margin-top: 8px; font-size: 15px; }

.band { background: var(--navy); color: #fff; padding: 72px 0; }
.band h2 { color: #fff; }
.band p { color: #c9d4f5; margin-top: 12px; max-width: 36em; }
.band .btn { background: #fff; color: var(--navy); }
.band .btn:hover { background: var(--cyan); }
.band .wrap { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }

/* Inner pages */
.page-head { padding: 72px 0 48px; background: var(--mist); border-bottom: 1px solid var(--line); }
.page-head .lead { margin-top: 18px; }
.page-body { padding: 64px 0 96px; }
.draft { background: #fff7e0; border: 1px solid #f0d58a; color: #6b4e00; border-radius: 12px; padding: 14px 18px; font-size: 15px; margin-bottom: 32px; max-width: 42em; }

.roles { list-style: none; border-top: 1px solid var(--line); margin-top: 24px; }
.roles li { display: grid; grid-template-columns: 1fr auto; gap: 6px 24px; padding: 26px 0; border-bottom: 1px solid var(--line); }
.roles p { color: var(--slate); grid-column: 1; max-width: 40em; }
.roles .where { grid-column: 2; grid-row: 1; color: var(--slate); font-size: 15px; text-align: right; }
.roles .btn { grid-column: 2; grid-row: 2; justify-self: end; align-self: start; padding: 10px 18px; font-size: 15px; }

.contacts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 8px; }
.contact { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.contact p { color: var(--slate); margin-top: 8px; font-size: 15px; }
.contact a.mail { display: inline-block; margin-top: 14px; font-weight: 600; font-size: 17px; }
.emergency { border-left: 4px solid var(--alert); background: #fdf1ee; padding: 18px 22px; border-radius: 0 12px 12px 0; margin-bottom: 40px; max-width: 42em; }
.emergency strong { color: var(--alert); }

table.facts { border-collapse: collapse; width: 100%; max-width: 46em; margin-top: 18px; font-size: 15.5px; }
table.facts th, table.facts td { text-align: left; padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.facts th { color: var(--slate); font-weight: 600; width: 34%; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 15px; color: var(--slate); }
.foot .cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot h4 { font-size: 14px; color: var(--ink); margin-bottom: 12px; font-family: var(--display); }
.foot ul { list-style: none; }
.foot li + li { margin-top: 8px; }
.foot a { color: var(--slate); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.foot .legal { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13.5px; }
.foot .brand img { height: 26px; margin-bottom: 14px; }

@media (max-width: 900px) {
  .hero .wrap, .rules, .markets, .foot .cols, .contacts { grid-template-columns: 1fr; }
  .chat { justify-self: start; }
  .promise { grid-template-columns: 1fr; }
  .promise > div, .promise > div:nth-child(even) { padding: 26px 0; border-right: 0; }
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 24px 16px; }
  .nav.open { display: flex; }
  .nav a { display: block; padding: 12px 0; }
  .roles li { grid-template-columns: 1fr; }
  .roles .where, .roles .btn { grid-column: 1; grid-row: auto; text-align: left; justify-self: start; }
}
