:root{--ink:#173242;--muted:#6d8592;--a:#176b75;--bg:#f4f7f6;--line:#e1e9e8;--white:#fff;--shadow:0 10px 38px rgba(22,51,66,.07)}*{box-sizing:border-box}body{margin:0;font-family:Inter,"PingFang SC","Noto Sans CJK SC",system-ui,sans-serif;background:var(--bg);color:var(--ink)}a{color:inherit}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:not-allowed}.primary{background:var(--a);border:1px solid var(--a);color:white;border-radius:9px;padding:11px 17px;font-weight:650}.primary:hover{filter:brightness(.9)}.secondary{background:#fff;border:1px solid #cbdcd9;color:#24636c;border-radius:9px;padding:10px 15px}.link{background:none;border:0;color:var(--a);padding:4px;font-weight:600}.small{font-size:12px}.muted{color:var(--muted)}.note{font-size:12px;line-height:1.6;color:var(--muted)}.card{background:var(--white);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}.cardpad{padding:22px}.eyebrow{font-size:11px;letter-spacing:1.8px;font-weight:800;color:var(--a);text-transform:uppercase}.section-title{font-size:19px;font-weight:750;margin:0 0 16px}.field{display:flex;flex-direction:column;gap:6px;margin-bottom:13px}.field label{font-size:12px;font-weight:700;color:#3a5967}.field input,.field textarea,.field select{width:100%;padding:10px 11px;border:1px solid #cfdddf;border-radius:8px;background:white;outline:none;color:#213c49}.field textarea{resize:vertical;min-height:76px}.field input:focus,.field textarea:focus,.field select:focus{border-color:#4da6aa;box-shadow:0 0 0 3px #8de4e631}.status{border-radius:7px;background:#e9f7f2;padding:8px 10px;color:#226448;font-size:12px}.warn{background:#fff1e9;color:#a95027}.tag{background:#e6f1ef;color:#176b75;border:1px solid #d0e4df;border-radius:100px;font-size:11px;padding:5px 10px}.divider{border:0;border-top:1px solid var(--line);margin:18px 0}.stack{display:flex;flex-direction:column;gap:12px}.row{display:flex;align-items:center;gap:12px}.between{justify-content:space-between}.flex{flex:1}.hidden{display:none!important}.break{overflow-wrap:anywhere;word-break:break-word}#flash{display:none;white-space:pre-wrap}.site-header{height:78px;border-bottom:1px solid #e6eae8;background:white;display:flex;align-items:center;justify-content:space-between;padding:0 max(24px,calc((100vw - 1160px)/2))}.brand{display:flex;align-items:center;gap:11px;font-size:18px;font-weight:800}.brand-mark{height:37px;width:37px;display:grid;place-items:center;border-radius:11px;background:var(--a);color:white;font-size:17px}.brand img{width:38px;height:38px;object-fit:contain;border-radius:7px}.site-nav{display:flex;gap:25px;font-size:13px;color:#59737c}.site-nav a{text-decoration:none}.site-wrap{max-width:1160px;margin:0 auto;padding:0 24px}.hero{background:linear-gradient(128deg,#e8f3f1,#f3f8f5 60%,#e5ecea);padding:72px 0;overflow:hidden}.hero-grid{display:grid;grid-template-columns:1.2fr .8fr;gap:40px;align-items:center}.hero h1{font-size:clamp(30px,4.2vw,52px);letter-spacing:-1.8px;line-height:1.17;margin:15px 0}.hero p{font-size:16px;color:#537178;line-height:1.9;max-width:650px}.hero-graphic{background:linear-gradient(145deg,#0d3040,#195e5f);border-radius:25px;color:white;min-height:285px;padding:26px;display:flex;flex-direction:column;justify-content:space-between;box-shadow:0 25px 55px #244c5133}.glass{background:#ffffff18;border:1px solid #ffffff28;border-radius:13px;padding:16px}.site-section{padding:55px 0}.site-section h2{font-size:28px;margin:0 0 9px}.grid3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.product-card{overflow:hidden}.product-image{height:145px;background:#e0edeb;display:flex;align-items:center;justify-content:center;color:#87a6a2;font-size:35px}.product-image img{height:100%;width:100%;object-fit:cover}.product-body{padding:20px}.product-body h3{font-size:16px;margin:0 0 9px}.product-body p{line-height:1.65;font-size:13px;min-height:40px}.price{font-weight:800;font-size:23px;color:#205963}.chat-shell{display:grid;grid-template-columns:230px 1fr;min-height:430px;overflow:hidden}.chat-aside{padding:24px;border-right:1px solid var(--line);background:#f7faf9}.chat-aside button{display:block;width:100%;margin-bottom:11px;text-align:left}.modebtn{border:1px solid #d7e3e0;border-radius:10px;background:white;padding:13px 12px;color:#385d66}.modebtn.active{background:#e1f2ed;border-color:#6db7a3;color:#205e53}.chat-content{display:flex;flex-direction:column;min-height:430px}.chat-history{flex:1;padding:24px;overflow:auto;min-height:260px;max-height:350px}.bubble{border-radius:14px;padding:12px 15px;margin:0 0 13px;max-width:86%;font-size:14px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}.bubble.assistant{background:#edf3f2}.bubble.user{background:#d7eae5;margin-left:auto}.chat-form{padding:15px;border-top:1px solid var(--line);display:flex;gap:9px}.chat-form input{flex:1;border:1px solid #d2deda;border-radius:9px;padding:11px;min-width:0}.footer{padding:30px 0;border-top:1px solid var(--line);color:#7b929b;font-size:12px;background:white}.builder{display:grid;grid-template-columns:245px minmax(330px,510px) minmax(380px,1fr);min-height:100vh}.sidebar{background:#102e3c;color:#e1eff1;padding:27px 19px;position:sticky;top:0;height:100vh;overflow:auto}.sidebar h1{font-size:20px;margin:4px 0 2px;letter-spacing:-.5px}.sidebar .subtitle{color:#95b5bd;font-size:12px;margin-bottom:35px}.sidebtn{display:block;border:0;width:100%;text-align:left;padding:12px;border-radius:9px;color:#b6d0d5;background:none;margin-bottom:6px}.sidebtn.active,.sidebtn:hover{background:#ffffff14;color:white}.side-foot{font-size:11px;color:#789ba6;position:relative;margin-top:35px;line-height:1.7}.builder-main{background:#f6f8f8;padding:29px;overflow:auto;height:100vh;border-right:1px solid var(--line)}.builder-main h2{font-size:23px;margin:0 0 5px}.form-note{background:#e9f3f1;border-left:3px solid var(--a);border-radius:7px;padding:12px;color:#44666b;font-size:12px;line-height:1.7;margin-bottom:18px}.preview{padding:26px;background:#edf2f0;min-width:0}.preview-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.preview-frame{background:white;width:100%;height:calc(100vh - 115px);min-height:560px;border:1px solid #ccd8d5;border-radius:14px;box-shadow:0 17px 30px #163f4a16}.builder-panel{display:none}.builder-panel.active{display:block}.pill{font-size:11px;padding:5px 9px;border-radius:15px;background:#edf7f2;color:#1b6a53}.listrow{border-bottom:1px solid var(--line);padding:12px 0;font-size:13px}.secret{background:#102c38;color:#d8efed;padding:12px;font:12px ui-monospace,monospace;border-radius:7px;overflow-wrap:anywhere;line-height:1.6}.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}@media(max-width:1150px){.builder{grid-template-columns:190px 1fr}.preview{display:none}.builder-main{height:auto;min-height:100vh}}@media(max-width:720px){.builder{grid-template-columns:1fr}.sidebar{position:static;height:auto;padding:15px}.sidebar h1{font-size:17px}.sidebar .subtitle,.side-foot{display:none}.sidebtn{display:inline-block;width:auto;padding:8px;font-size:12px}.builder-main{padding:20px}.hero{padding:46px 0}.hero-grid{grid-template-columns:1fr}.hero-graphic{min-height:200px}.grid3{grid-template-columns:1fr}.chat-shell{grid-template-columns:1fr}.chat-aside{border-right:0;border-bottom:1px solid var(--line);padding:14px}.chat-aside button{display:inline-block;width:auto;margin-right:7px}.site-nav{display:none}.site-header{padding:15px 20px;height:auto}.two{grid-template-columns:1fr}}

.company-site { display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100dvh; background: #fff; }
.company-sidebar { position: sticky; top: 0; height: 100dvh; background: #f5f7f7; border-right: 1px solid var(--line); padding: 24px 14px; }
.company-sidebar .brand { padding: 0 8px; overflow-wrap: anywhere; }
.company-nav { display: grid; gap: 6px; margin-top: 30px; }
.company-nav a { display: flex; gap: 12px; align-items: center; color: var(--ink); padding: 11px 12px; border-radius: 9px; text-decoration: none; font-size: 14px; }
.company-nav a > span:first-child { width: 18px; flex-shrink: 0; text-align: center; }
.company-nav a:hover, .company-nav a[aria-current="page"] { background: #e4eceb; }
.company-nav a[aria-current="page"] { font-weight: 700; }
.company-main { min-width: 0; }
.company-site > .footer { grid-column: 2; }
.company-main > section { display: none; }
[data-site-page="service"] #service, [data-site-page="store"] #store,
[data-site-page="works"] #works, [data-site-page="contact"] #contact { display: block; }
[data-site-page="service"] #service { display: flex; }
.company-chat { width: min(760px, 100%); min-height: 88dvh; margin: auto; padding: 36px 24px 56px; flex-direction: column; justify-content: center; }
.company-welcome { text-align: center; }
.company-welcome h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 12px 0; }
.company-welcome p { max-width: 54ch; margin: 0 auto 24px; }
.company-prompts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 20px; }
.company-chat .chat-history { background: transparent; min-height: 0; padding: 0; }
.company-chat .chat-history:empty { display: none; }
.company-composer { margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.company-composer textarea { width: 100%; border: 0; background: transparent; resize: vertical; font: inherit; padding: 8px; }
.company-composer-actions { display: flex; justify-content: flex-end; }
@media (max-width: 650px) {
  .company-site { display: block; }
  .company-sidebar { height: auto; z-index: 2; padding: 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .company-nav { display: flex; overflow-x: auto; margin-top: 8px; }
  .company-nav a { white-space: nowrap; padding: 8px; gap: 5px; }
  .company-chat { min-height: 72dvh; padding: 24px 14px; }
}

.company-site { background-color: var(--visitor-background, #fff); background-image: var(--visitor-image, none); background-size: cover; background-position: center; background-attachment: fixed; }
.company-site[data-theme="paper"] { --ink: #45382b; --muted: #695746; --line: #dbcbb6; --white: #fcf4e6; background: #f6ead8; }
.company-site[data-theme="dark"] { --ink: #edf1f4; --muted: #aab7c2; --line: #3a4650; --white: #222a33; background: #171e25; }
.company-sidebar { display: flex; flex-direction: column; background: var(--white); }
.company-account { margin-top: auto; text-align: left; }
.company-agent-menu { margin: 0 0 4px 14px; padding-left: 10px; border-left: 1px solid var(--line); }
.company-agent-menu summary { cursor: pointer; padding: 7px 8px; color: var(--muted); font-size: 13px; }
.company-roles { display: grid; gap: 4px; padding: 4px 0; }
.company-roles button { text-align: left; padding: 7px 10px; border-color: transparent; }
.company-roles [aria-pressed="true"] { color: #fff; background: var(--a); border-color: transparent; }
.company-composer, .company-welcome { background: var(--white); color: var(--ink); }
.company-welcome { border-radius: 16px; padding: 16px; }
.company-composer textarea { color: inherit; }
.company-settings { color: var(--ink); background: var(--white); width: min(490px, 94vw); max-height: 84dvh; padding: 20px; border: 1px solid var(--line); }
.company-settings [hidden] { display: none !important; }
.company-settings #visitor-history { max-height: 180px; overflow: auto; margin-bottom: 10px; }
.company-site[data-theme="dark"] .secondary, .company-site[data-theme="dark"] .company-nav a { color: var(--ink); background: #2b3640; }
.company-site[data-theme="dark"] .company-nav a[aria-current="page"], .company-site[data-theme="dark"] .company-roles [aria-pressed="true"] { background: #375166; }

@media (max-width: 650px) { .company-account { margin-top: 8px; align-self: flex-end; } }

@media (max-width: 650px) {
  .company-nav { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); justify-content: start; }
  .company-agent-menu { grid-row: 2; grid-column: 1 / -1; margin-left: 5px; }
  .company-roles { display: flex; flex-wrap: wrap; }
}

.sidebar-toggle { align-self: flex-end; display: grid; place-items: center; width: 44px; height: 44px; padding: 10px; margin-bottom: 15px; border: 0; border-radius: 13px; background: transparent; color: var(--muted); transition: background .18s, color .18s; }
.sidebar-toggle:hover { background: var(--line); color: var(--ink); }
.sidebar-toggle:focus-visible { outline: 2px solid var(--a); outline-offset: 2px; }
.company-roles button { display: flex; align-items: center; gap: 9px; }
.agent-icon { width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 6px; text-align: center; font-size: 12px; line-height: 20px; flex-shrink: 0; }
.company-account { display: flex; gap: 10px; align-items: center; }
.company-site.sidebar-collapsed { grid-template-columns: 72px minmax(0, 1fr); }
.sidebar-collapsed .company-sidebar { padding: 16px 9px; }
.sidebar-collapsed .sidebar-label { display: none; }
.sidebar-collapsed .company-sidebar .brand { justify-content: center; padding: 0; }
.sidebar-collapsed .company-nav a { justify-content: center; padding: 10px 6px; }
.sidebar-collapsed .company-agent-menu { margin-left: 0; padding-left: 0; border: 0; }
.sidebar-collapsed .company-agent-menu summary { font-size: 0; text-align: center; }
.sidebar-collapsed .company-agent-menu summary::after { content: 'AI'; font-size: 11px; }
.sidebar-collapsed .company-roles button { justify-content: center; padding: 6px; }
.sidebar-collapsed .company-account { justify-content: center; padding: 10px; }
@media (max-width: 650px) {
  .company-site.sidebar-collapsed { display: grid; }
  .sidebar-collapsed .company-sidebar { height: 100dvh; border-right: 1px solid var(--line); }
  .sidebar-collapsed .company-nav { display: grid; grid-template-columns: 1fr; overflow: visible; }
  .sidebar-collapsed .company-agent-menu { grid-column: auto; grid-row: auto; }
  .sidebar-collapsed .company-roles { display: grid; }
  .sidebar-collapsed .company-account { align-self: stretch; margin-top: auto; }
}

.site-editor-toolbar { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; width: max-content; max-width: 94vw; padding: 12px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); color: var(--ink); box-shadow: var(--shadow); }
.site-editing [data-edit-key] { outline: 1px dashed var(--a); outline-offset: 3px; cursor: text; }
.site-editing [data-edit-key]:focus { outline: 2px solid var(--a); }
.site-editing .editable-role-name { outline: 1px dashed var(--a); outline-offset: 3px; cursor: pointer; }
body:has(.site-editor-toolbar) .company-main { padding-bottom: 110px; }

.module-grid { display: grid; gap: 20px; padding-top: 28px; }
.module-add { min-height: 130px; width: 100%; border: 2px dashed var(--line); border-radius: 14px; background: var(--white); color: var(--ink); font: inherit; cursor: pointer; }
.module-image { display: block; max-width: 100%; max-height: 420px; object-fit: contain; margin: 16px 0; }
.company-settings [hidden] { display: none !important; }
.uploaded-icon { width: 24px; height: 24px; object-fit: contain; display: block; }

#emoji-picker[hidden] { display: none; }
#emoji-picker { flex-wrap: wrap; gap: 6px; padding: 10px; }
.company-composer-actions { justify-content: space-between; gap: 8px; flex-wrap: wrap; }

.sidebar-collapsed .company-agent-menu { display: none; }

.company-site.sidebar-collapsed { grid-template-columns: 88px minmax(0, 1fr); }
.sidebar-collapsed .company-nav a { min-height: 54px; padding: 12px 8px; }
.sidebar-collapsed .company-nav a > span:first-child { width: 32px; height: 32px; font-size: 28px; line-height: 32px; }
.sidebar-collapsed .uploaded-icon { width: 32px; height: 32px; }
.sidebar-collapsed .company-sidebar .brand-mark,
.sidebar-collapsed .company-sidebar #brand-img { width: 40px; height: 40px; }
.sidebar-collapsed .company-account { min-height: 50px; font-size: 26px; }
.sidebar-collapsed .sidebar-toggle { align-self: center; min-width: 44px; min-height: 40px; font-size: 22px; }

.icon-pool { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; padding: 16px 0; }
.icon-pool[hidden] { display: none; }
.icon-choice { min-height: 54px; font-size: 28px; padding: 8px; }
.icon-choice[aria-pressed="true"] { outline: 2px solid var(--a); outline-offset: 1px; }
.company-roles .agent-icon { font-size: 18px; width: 26px; height: 26px; line-height: 24px; }

.knowledge-workspace { width: min(1000px, 96vw); }
.knowledge-workspace fieldset { border: 0; padding: 0; min-width: 0; margin: 0; }
.knowledge-workspace [hidden], .company-roles [hidden] { display: none !important; }
.knowledge-columns { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 3fr); gap: 24px; margin-top: 18px; }
.knowledge-list { display: grid; gap: 8px; max-height: 450px; overflow: auto; padding-top: 12px; }
.knowledge-item { text-align: left; overflow-wrap: anywhere; }
.backend-tabs { flex-wrap: wrap; gap: 8px; }
.backend-tabs [aria-selected="true"] { background: var(--a); color: #fff; }
.chat-sources { font-size: 13px; margin-top: 12px; }
.chat-sources p { max-height: 180px; overflow: auto; }
#knowledge-grants, #knowledge-search-form { flex-wrap: wrap; gap: 10px; }
#knowledge-results { display: grid; gap: 10px; margin-top: 14px; }
@media (max-width: 650px) { .knowledge-columns { grid-template-columns: 1fr; } .knowledge-list { max-height: 130px; } }

.branding-preview { display: flex; align-items: center; justify-content: center; min-height: 150px; padding: 20px; margin: 16px 0; background: #eff3f4; border: 1px dashed var(--line); border-radius: 12px; color: #42535f; }
.branding-preview img { max-width: 100%; max-height: 180px; object-fit: contain; }
.branding-preview [hidden] { display: none !important; }
.editable-brand-logo { cursor: pointer; }
.editable-brand-logo:focus-visible { outline: 2px solid var(--a); }

.make-site-entry { position: fixed; top: 20px; right: 24px; z-index: 3; text-decoration: none; box-shadow: var(--shadow); }
body:has(.make-site-entry) .company-chat { padding-top: 90px; }
.site-editor-toolbar { max-height: 32dvh; overflow-y: auto; }
@media(max-width:650px) { .make-site-entry { top: auto; bottom: 20px; right: 16px; } body:has(.site-editor-toolbar) .make-site-entry { bottom: 35dvh; } }

.company-sidebar .brand-mark, .company-sidebar #brand-img { flex-shrink: 0; }
.company-sidebar .brand { flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.company-site[data-brand-logo="false"] #brand-img,
.company-site[data-brand-logo="false"] #brand-mark,
.company-site[data-brand-name="false"] #brand-name { display: none !important; }
.company-site.sidebar-collapsed[data-brand-logo="false"] #brand-name { display: block; font-size: 12px; max-width: 100%; line-height: 1.5; }

.showcase-site .company-sidebar { background: var(--white); }
.showcase-site .company-sidebar .brand { font-size: 23px; letter-spacing: 2px; }
.showcase-site .company-sidebar #brand-img { width: 48px; height: 48px; }
.showcase-site .company-welcome { background: transparent; padding: 24px 0; }
.showcase-site .company-welcome h1 { max-width: 16ch; margin: 18px auto; line-height: 1.35; letter-spacing: -1.5px; }
.showcase-site .company-welcome p { line-height: 1.9; }
.showcase-site .company-composer { background: var(--white); }
.showcase-site .site-section h2 { font-size: clamp(28px, 3.5vw, 42px); line-height: 1.35; }
.showcase-site .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 24px; }
.showcase-site .module-grid article { padding: 28px; box-shadow: none; }
.showcase-site .module-grid h3 { margin-top: 0; font-size: 20px; line-height: 1.5; }
.showcase-site .module-grid p { line-height: 1.9; color: var(--muted); white-space: pre-line; margin-bottom: 0; }
.showcase-site .footer .row { flex-wrap: wrap; line-height: 1.8; }
.grid3[hidden] { display: none; }
@media(max-width:800px) { .showcase-site .module-grid { grid-template-columns: 1fr; } }
@media(max-width:650px) {
  .showcase-site .company-welcome h1 { font-size: 30px; }
  .showcase-site .make-site-entry { font-size: 13px; padding: 10px 14px; }
}

/* 老站承载页（2026-11-06）：/products /stories /contact /learn 注入的老站主体
   不受新站 .company-main > section { display:none } 影响 */
.company-main.legacy-page-main { width: auto; max-width: none; margin: 0; padding: 0 0 120px; overflow-x: clip; }
.company-main.legacy-page-main .legacy-hosted-body { display: block; }
.company-main.legacy-page-main .legacy-hosted-hidden { display: none !important; }
.company-main.legacy-page-main .legacy-hosted-body .portal-main { width: min(1280px, calc(100% - 100px)); margin: auto; padding-bottom: 95px; }
/* 老站装饰元素用 transform:rotate 做轻微倾斜，在带侧栏的新站里会超出视口造成横向滚动条。
   这里保留视觉但消除溢出：给旋转元素留出安全边距并裁掉多出部分。 */
.legacy-page-main .learn-cover { transform: rotate(1.6deg); }
.company-main.legacy-page-main > section,
.company-main.legacy-page-main > div { display: block; }
.company-main.legacy-page-main .portal-main { width: min(1280px, calc(100% - 100px)); margin: auto; padding-bottom: 95px; }
body.legacy-hosted { background: #f4f2ec; }
body.legacy-hosted .company-main { background: #f4f2ec; }
/* 老站承载页：右上角固定的"创建/登录"按钮会压住老站 hero 内容（fixed 定位），
   老站栏目页本身不需要开通入口，导航统一走左侧栏。 */
body.legacy-hosted .make-site-entry { display: none !important; }

/* 老站承载页在移动端：极客站的固定浮动条与"创建/登录"按钮会压住老站长页内容，
   改为在承载页隐藏浮动条，导航走侧边栏（已含全部栏目入口）。 */
@media (max-width: 1080px) {
  body.legacy-hosted .showcase-topnav,
  body.legacy-hosted .make-site-entry { display: none !important; }
  body.legacy-hosted .company-main.legacy-page-main { padding-bottom: 40px; }
}
