:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172c35;
  background: #fbfcfa;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; }
.container { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
.narrow { max-width: 680px; }
.skip-link { position: absolute; left: 16px; top: -80px; z-index: 100; padding: 12px 18px; background: #fff; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 3px solid #e89445; outline-offset: 3px; }

.site-header { background: rgba(255, 255, 255, .96); border-bottom: 1px solid #e4eae8; position: relative; z-index: 10; }
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.18rem; font-weight: 760; letter-spacing: -.045em; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: #197d78; font-weight: 800; font-size: 1.25rem; }
.company-brand .brand-mark { background: #173b63; font-size: 1.1rem; }
.brand-light { font-weight: 450; }
.site-header nav { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; }
.site-header nav a { text-decoration: none; font-size: .91rem; font-weight: 600; }
.site-header nav a:hover, .text-link:hover, .text-button:hover { text-decoration: underline; }
.site-header nav .nav-cta { background: #e9f5f2; color: #0c625b; border-radius: 100px; padding: 11px 17px; }
.company-site .site-header nav .nav-cta { background: #eaf0f8; color: #173b63; }
.account-label { color: #50636b; font-size: .85rem; }

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { letter-spacing: -.045em; line-height: 1.12; }
h1 { font-size: clamp(2.6rem, 5.3vw, 5.05rem); font-weight: 780; }
h2 { font-size: clamp(1.75rem, 3vw, 2.8rem); }
h3 { font-size: 1.28rem; }
p { line-height: 1.65; color: #52646b; }
.eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .17em; font-size: .72rem; font-weight: 800; color: #17766f; margin-bottom: 18px; }
.company-site .eyebrow, .admin-site .eyebrow { color: #456ba4; }
.button { border: 1px solid transparent; border-radius: 12px; padding: 14px 19px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; text-decoration: none; font-size: .93rem; font-weight: 700; min-height: 48px; transition: transform .15s, box-shadow .15s, background .15s; }
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(14, 61, 71, .11); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.button-primary { color: #fff; background: #13776e; }
.company-site .button-primary, .admin-site .button-primary { background: #173b63; }
.button-outline { color: #173b63; background: #fff; border-color: #b7c9d8; }
.text-link { font-size: .92rem; color: #175b57; font-weight: 700; text-decoration: none; }
.text-button { padding: 0; background: none; color: #1e5f89; border: 0; font-weight: 700; text-decoration: underline; }

.hero { overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.07fr .93fr; align-items: center; gap: clamp(35px, 6vw, 90px); min-height: 550px; padding-block: 86px; }
.hero-lead { font-size: 1.13rem; max-width: 590px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; margin: 30px 0 18px; }
.small-note { max-width: 560px; font-size: .8rem; line-height: 1.6; }
.clinic-hero { background: radial-gradient(circle at 78% 17%, #e1f3e8 0, transparent 34%), linear-gradient(110deg, #f7fbf6 0%, #ebf6f1 100%); }
.company-hero { background: radial-gradient(circle at 83% 18%, #d8e5f5 0, transparent 35%), linear-gradient(110deg, #f9fbfd 0%, #eaf0f8 100%); }
.hero-art { position: relative; min-height: 365px; display: grid; place-items: center; }
.orbit { position: absolute; border: 1px solid #c6e1d6; border-radius: 50%; }
.orbit-one { width: 410px; height: 410px; }
.orbit-two { width: 310px; height: 310px; background: rgba(255, 255, 255, .35); }
.art-card { position: relative; background: #fff; padding: 24px; border-radius: 20px; box-shadow: 0 26px 60px rgba(16, 78, 72, .13); width: min(365px, 100%); transform: rotate(-3deg); }
.art-card-head { border-bottom: 1px solid #e9efed; padding-bottom: 15px; margin-bottom: 22px; font-size: .78rem; color: #63777a; font-weight: 700; }
.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #3db7a4; margin-right: 8px; }
.bubble { border-radius: 13px; padding: 13px 15px; font-size: .83rem; line-height: 1.45; margin-bottom: 12px; }
.patient-bubble { margin-left: 30px; background: #eaf4f1; }
.bot-bubble { margin-right: 30px; background: #f0f3f6; }
.preview-tag { color: #23836f; font-size: .7rem; font-weight: 700; margin-top: 20px; }
.company-art { min-height: 365px; display: grid; place-items: center; }
.diagram-card { width: min(430px, 100%); background: #fff; border: 1px solid #e2eaf4; border-radius: 22px; padding: 28px; box-shadow: 0 26px 60px rgba(29, 66, 109, .13); transform: rotate(2deg); }
.diagram-caption { display: block; font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #6282ac; margin-bottom: 22px; }
.diagram-node { background: #f3f7fb; border: 1px solid #dce7f2; border-radius: 11px; padding: 15px; font-size: .86rem; font-weight: 720; text-align: center; color: #27435f; }
.diagram-node-active { background: #173b63; color: #fff; }
.diagram-arrow { text-align: center; color: #809cb7; font-size: 1.4rem; padding: 5px; }
.diagram-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.diagram-row .diagram-node { font-size: .74rem; }
.notice-strip { background: #fcebd9; color: #6a3b1d; padding: 17px 0; }
.notice-strip .container { display: flex; gap: 13px; align-items: baseline; font-size: .89rem; }
.notice-strip strong { white-space: nowrap; }
.section { padding-block: 96px; }
.section-tint { background: #f1f7f6; }
.company-site .section-tint, .admin-site .section-tint { background: #eef3f9; }
.section-heading { max-width: 690px; margin-bottom: 42px; }
.section-heading h2 { margin-bottom: 16px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature-card, .steps-card, .admin-card { background: #fff; border: 1px solid #e5ecea; border-radius: 18px; box-shadow: 0 10px 28px rgba(16, 51, 62, .035); }
.feature-card { padding: 30px; }
.feature-card p { margin-bottom: 0; font-size: .91rem; }
.feature-number { display: inline-grid; place-items: center; background: #e7f4ed; color: #19776b; width: 38px; height: 38px; border-radius: 11px; font-size: .75rem; font-weight: 800; margin-bottom: 26px; }
.company-site .feature-number { background: #edf2fa; color: #3d6596; }
.split-panel { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 80px; }
.steps-card { padding: 26px; }
.steps-card > div { padding: 15px 0; display: flex; gap: 15px; align-items: center; font-size: .9rem; font-weight: 650; border-bottom: 1px solid #eef1f0; }
.steps-card > div:last-child { border: 0; }
.steps-card span { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: #e4f3ed; color: #13776e; }
.link-stack { display: grid; gap: 10px; }
.link-stack a { display: flex; justify-content: space-between; align-items: center; gap: 14px; background: #fff; border: 1px solid #e1eaf0; border-radius: 12px; padding: 19px 21px; text-decoration: none; }
.link-stack a:hover { border-color: #87a5c3; box-shadow: 0 8px 20px rgba(28, 61, 96, .07); }
.link-stack a span { font-size: .81rem; color: #59738a; }
.site-footer { border-top: 1px solid #e4ece9; color: #718389; background: #fff; padding-block: 24px; }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; font-size: .76rem; }

.chat-site { background: #f6f9f8; }
.chat-site.theme-blue { --chat-accent: #315f98; --chat-pale: #edf3fb; }
.chat-site.theme-teal { --chat-accent: #157a70; --chat-pale: #eaf5f1; }
.chat-site .brand-mark { background: var(--chat-accent); }
.chat-main { padding: 50px 0 74px; }
.chat-intro { max-width: 810px; }
.chat-intro h1 { font-size: clamp(2.15rem, 4vw, 3.65rem); margin-bottom: 14px; }
.chat-intro p { font-size: 1.02rem; }
.safety-banner { display: flex; align-items: baseline; gap: 13px; border: 1px solid #f2d6aa; background: #fff4e5; color: #674423; padding: 16px 20px; border-radius: 13px; font-size: .86rem; margin: 28px 0; }
.safety-banner strong { white-space: nowrap; }
.chat-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 20px; align-items: start; }
.scenario-panel, .conversation-panel { background: #fff; border: 1px solid #e3ebe9; border-radius: 18px; box-shadow: 0 8px 30px rgba(18, 52, 61, .04); }
.scenario-panel { padding: 23px; }
.scenario-panel h2 { font-size: 1.22rem; }
.scenario-panel p { font-size: .83rem; line-height: 1.5; }
.scenario-list { display: grid; gap: 9px; margin: 22px 0; }
.scenario-button { border: 1px solid #dfe9e6; border-radius: 11px; background: #fff; text-align: left; padding: 13px; display: grid; gap: 5px; }
.scenario-button:hover { background: var(--chat-pale); border-color: var(--chat-accent); }
.scenario-button strong { color: #1f3b42; font-size: .85rem; }
.scenario-button small { color: #6b7e82; font-size: .72rem; line-height: 1.45; }
.aside-note { border-top: 1px solid #e8eeec; padding-top: 18px; font-size: .84rem; }
.aside-note p { margin: 8px 0; }
.aside-note a { color: var(--chat-accent); font-weight: 700; }
.record-result { margin-top: 12px; font-size: .79rem; color: #36685c; }
.conversation-panel { min-height: 530px; display: flex; flex-direction: column; overflow: hidden; }
.conversation-header { display: flex; align-items: center; padding: 17px 24px; border-bottom: 1px solid #e8eeec; }
.conversation-header div { display: flex; flex-direction: column; gap: 3px; }
.conversation-header strong { font-size: .85rem; }
.conversation-header small { color: #728488; font-size: .74rem; }
.conversation { flex: 1; min-height: 340px; max-height: 580px; overflow: auto; padding: 26px; display: grid; align-content: start; gap: 16px; }
.empty-chat { text-align: center; align-self: center; padding: 45px 16px; }
.empty-chat h2 { font-size: 1.25rem; margin: 8px 0; }
.empty-chat p { font-size: .85rem; }
.empty-icon { margin: auto; width: 45px; height: 45px; display: grid; place-items: center; border-radius: 15px; background: var(--chat-pale); color: var(--chat-accent); font-size: 1.5rem; }
.message { max-width: min(540px, 90%); border-radius: 15px; padding: 15px 17px; font-size: .88rem; line-height: 1.5; }
.message-user { justify-self: end; background: var(--chat-pale); }
.message-assistant { justify-self: start; background: #f4f6f7; }
.message p { margin: 0 0 10px; color: #213a42; }
.message p:last-child { margin-bottom: 0; }
.message .route-pill { display: inline-block; margin: 5px 0 12px; color: #78501d; background: #fff0d7; padding: 6px 10px; border-radius: 50px; font-size: .74rem; font-weight: 750; }
.source-card { border-top: 1px solid #dfe6e7; padding-top: 10px; margin-top: 12px; font-size: .78rem; color: #4d676d; }
.source-card strong { display: block; }
.reference-card a, .reference-card small { display: block; margin-top: .4rem; }
.reference-card details { margin-top: .4rem; overflow-wrap: anywhere; }
.message-meta { margin-top: 12px; font-size: .69rem; color: #6e8186; }
.composer { border-top: 1px solid #e8eeec; padding: 18px 24px 20px; }
.composer label { display: block; font-size: .8rem; font-weight: 750; margin-bottom: 9px; }
.composer-row { display: flex; gap: 10px; }
.composer-row input { flex: 1; min-width: 0; border: 1px solid #cadbd8; border-radius: 10px; padding: 11px 13px; }
.composer-row button { min-width: 95px; }
.composer small { display: block; margin-top: 10px; font-size: .7rem; color: #71848a; }
.page-disclaimer { margin: 22px 0 0; font-size: .79rem; }

.admin-site { background: #f6f8fb; }
.admin-main { padding: 62px 0 90px; }
.admin-heading { max-width: 730px; margin-bottom: 38px; }
.admin-heading h1 { font-size: clamp(2.25rem, 4vw, 3.7rem); margin-bottom: 14px; }
.admin-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; align-items: start; }
.admin-card { padding: 28px; border-color: #e0e9f1; }
.card-topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 18px; border-bottom: 1px solid #e6ecf1; margin-bottom: 22px; font-size: .85rem; font-weight: 760; }
.version-pill { border-radius: 100px; padding: 6px 10px; background: #ebf2fa; color: #36618d; font-size: .74rem; white-space: nowrap; }
.admin-card label { display: block; font-size: .83rem; font-weight: 760; margin: 18px 0 8px; }
.admin-card select { display: block; width: 100%; border: 1px solid #cbd9e6; padding: 12px 13px; border-radius: 9px; background: #fff; color: #263f55; }
.admin-card form > .button { margin-top: 26px; }
.admin-card .toggle-row { display: flex; justify-content: space-between; gap: 18px; align-items: center; border: 1px solid #e1e9f1; border-radius: 12px; padding: 17px; }
.toggle-row span { display: grid; gap: 5px; }
.toggle-row small { font-size: .73rem; font-weight: 400; color: #6d7d87; }
.toggle-row input { width: 20px; height: 20px; accent-color: #173b63; }
.preview-card h2 { font-size: 1.5rem; }
.preview-card p { font-size: .85rem; }
.preview-card .button { margin: 10px 0 20px; }
.scope-note { border-top: 1px solid #e5edf2; padding-top: 18px; font-size: .77rem; line-height: 1.5; color: #60717e; }
.form-status { margin: 15px 0 0; font-size: .8rem; min-height: 1.2em; }
.form-status.error { color: #a33e2a; }
.form-status.success { color: #167358; }
.comparison-results { display: grid; gap: 12px; margin-top: 20px; }
.result-card { border: 1px solid #dde7f0; border-radius: 11px; padding: 15px; background: #f9fbfe; }
.result-card strong { display: block; font-size: .8rem; overflow-wrap: anywhere; }
.result-card p { margin: 10px 0; font-size: .82rem; }
.result-card small { font-size: .72rem; color: #667d8b; }
code { overflow-wrap: anywhere; }

@media (max-width: 900px) {
  .hero-grid, .split-panel { grid-template-columns: 1fr; }
  .hero-grid { padding-block: 70px; }
  .hero-art, .company-art { min-height: 300px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .chat-layout, .admin-grid { grid-template-columns: 1fr; }
  .scenario-list { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 650px) {
  .container { width: min(100% - 32px, 1160px); }
  .header-inner { padding-block: 14px; flex-wrap: wrap; }
  .site-header nav { gap: 11px 17px; }
  .site-header nav a { font-size: .8rem; }
  .hero-grid { padding-block: 55px; }
  .hero-art, .company-art { display: none; }
  .section { padding-block: 70px; }
  .feature-grid, .scenario-list { grid-template-columns: 1fr; }
  .notice-strip .container, .safety-banner { display: block; }
  .notice-strip strong, .safety-banner strong { display: block; margin-bottom: 5px; }
  .footer-inner { flex-direction: column; gap: 5px; }
  .chat-main, .admin-main { padding-top: 35px; }
  .conversation { padding: 16px; }
  .composer { padding: 15px; }
  .composer-row { flex-direction: column; }
  .message { max-width: 95%; }
  .admin-card { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button { transition: none; }
}
.evaluation-candidate { margin-top: 1.5rem; }
.evaluation-candidate table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.evaluation-candidate th, .evaluation-candidate td { padding: .75rem; text-align: left; vertical-align: top; border-bottom: 1px solid #dce8e8; font-size: .85rem; overflow-wrap: anywhere; }
.evaluation-candidate p, .evaluation-candidate pre { overflow-wrap: anywhere; }
.evaluation-candidate pre { white-space: pre-wrap; }
