/* ECAC • Pantone 2386 C • sRGB 45 104 196 */
@font-face {
  font-family: "ECAC Song UI";
  src: url("/assets/song-ui.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "ECAC Song Full";
  src: local("Noto Serif SC"), local("Source Han Serif SC"), url("/assets/noto-serif-sc.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: light;
  --song: "SimSun", "宋体", "Songti SC", "STSong", "ECAC Song UI", "ECAC Song Full", serif;
  --blue: #2D68C4;
  --blue-hover: #2254a1;
  --ink: #132641;
  --navy: #101f38;
  --muted: #52667f;
  --line: #d2ddeb;
  --pale: #eaf1fc;
  --page: #f3f6fa;
  --white: #fff;
  --header: 76px;
  --gutter: clamp(22px, 4.5vw, 75px);
  --content: 1320px;
  --reader: 840px;
  font-family: var(--song);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 0; color: var(--ink); background: var(--page); line-height: 1.55; }
h1,h2,h3,h4,p { margin: 0; }
button,input,textarea,select,option,pre,code,kbd,samp { font-family: inherit; }
button,input,textarea,select { font-size: inherit; }
button,a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: inherit; text-decoration: none; }
button:focus-visible,a:focus-visible,textarea:focus-visible,input:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 3px;
}
::selection { background: #c4d9fc; color: #142c50; }
[hidden] { display: none !important; }
.sprite { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.ic { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.ic.sm { width: 15px; height: 15px; }
.top { height: var(--header); border-bottom: 1px solid var(--line); background: #fff; }
.top-inner {
  width: min(100%, calc(var(--content) + 2 * var(--gutter))); height: 100%;
  margin: auto; padding: 0 var(--gutter); display: flex; align-items: center; gap: 44px;
}
.brand { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.brand-logo { width: 110px; height: auto; display: block; }
.brandstack { border-left: 1px solid #c8d6e7; padding-left: 16px; display: grid; line-height: 1.25; }
.brandstack strong { font-size: 17px; letter-spacing: .14em; }
.brandstack small { margin-top: 3px; color: var(--muted); font-size: 12px; letter-spacing: .15em; }
.topnav { height: 100%; display: flex; align-items: stretch; gap: 30px; }
.topnav a { position: relative; display: flex; align-items: center; color: var(--muted); white-space: nowrap; font-size: 15px; }
.topnav a:hover,.topnav a[aria-current=page] { color: var(--blue-hover); }
.topnav a[aria-current=page] { font-weight: bold; }
.topnav a[aria-current=page]::after { content: ""; position: absolute; height: 3px; background: var(--blue); bottom: 0; left: 0; right: 0; }
.account { margin-left: auto; display: flex; gap: 8px; align-items: center; border: 1px solid #cbd8e9; border-radius: 6px; padding: 8px 12px; min-width: 0; font-size: 14px; }
.account span { max-width: 10em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account>.ic:first-child { color: var(--blue); width: 17px; height: 17px; }
.account:hover,.icon-only:hover,.secondary:hover { background: var(--pale); }
.home { max-width: calc(var(--content) + 2 * var(--gutter)); margin: 0 auto; padding: 31px var(--gutter) 0; }
.page-title,.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.page-title { margin-bottom: 17px; }
.page-title h1 { font-size: clamp(24px,2.2vw,32px); letter-spacing: .075em; line-height: 1.3; }
.date,.text-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; }
.date { color: var(--muted); }
.hero {
  position: relative; isolation: isolate; display: flex; align-items: center;
  min-height: clamp(304px,25.5vw,376px); background: #07172f; color: #fff;
  overflow: hidden; border-radius: 10px; border: 1px solid #193659;
}
.hero-art {
  position: absolute; z-index: -2; inset: 0;
  background-image: url("/assets/rail-scan.webp"); background-size: cover; background-position: 58% 48%;
}
.hero::before {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: linear-gradient(90deg,rgba(5,18,40,.9) 0%,rgba(8,24,50,.73) 23%,rgba(10,28,52,.15) 50%,transparent 68%);
}
.hero-frame { position: absolute; inset: 15px; pointer-events: none; opacity: .64; }
.hero-frame::before,.hero-frame::after { content: ""; position: absolute; width: 17px; height: 17px; border-style: solid; border-color: #9cc8ff; }
.hero-frame::before { left: 0; top: 0; border-width: 1px 0 0 1px; }
.hero-frame::after { right: 0; bottom: 0; border-width: 0 1px 1px 0; }
.hero-copy { padding: 35px clamp(27px,4.1vw,62px) 37px; }
.model-kicker { display: inline-flex; align-items: center; gap: 9px; color: #dbeaff; font-size: 15px; letter-spacing: .10em; line-height: 1.2; }
.model-kicker i { display: block; width: 22px; height: 1px; background: #97beff; }
.hero h2 { margin: 10px 0 9px; font-size: clamp(48px,5.1vw,76px); line-height: 1.06; font-weight: 700; letter-spacing: .035em; }
.hero h2 em { font-weight: inherit; font-style: normal; letter-spacing: .01em; }
.hero p { max-width: 29em; color: #e0eafa; font-size: clamp(15px,1.25vw,18px); line-height: 1.65; }
.hero-button,.primary,.new-chat,.send { background: var(--blue); color: #fff; }
.hero-button { display: inline-flex; align-items: center; gap: 25px; margin-top: 25px; padding: 10px 16px 10px 19px; border: 1px solid #6695e0; border-radius: 5px; font-size: 16px; font-weight: bold; letter-spacing: .02em; }
.hero-button .ic { width: 19px; }
.hero-button:hover,.primary:hover,.new-chat:hover,.send:not(:disabled):hover { background: var(--blue-hover); }
.hero-button:focus-visible,.sidebar a:focus-visible,.sidebar button:focus-visible { outline-color: #acd1ff; }
.task-section,.recent-section { margin-top: 27px; }
.section-title { margin-bottom: 12px; }
.section-title h2 { display: flex; align-items: center; gap: 10px; font-size: 22px; letter-spacing: .045em; line-height: 1.4; }
.section-title h2::before { content: ""; height: 16px; width: 3px; background: var(--blue); }
.tasks { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.task-card {
  position: relative; min-width: 0; text-align: left; display: grid; justify-items: start; align-content: start;
  min-height: 146px; padding: 17px 19px 16px; background: #fff; border: 1px solid var(--line); border-radius: 7px;
  box-shadow: 0 2px 4px rgba(18,48,84,.025);
}
.task-card:hover,.starter:hover { border-color: #85a8da; background: #f8fbff; box-shadow: 0 4px 15px rgba(24,65,118,.08); }
.task-card strong { margin-top: 10px; font-weight: bold; line-height: 1.35; font-size: 19px; }
.task-card small { color: var(--muted); font-size: 14px; line-height: 1.55; margin-top: 3px; }
.task-symbol { display: inline-grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border: 1px solid #cfdef3; background: linear-gradient(145deg,#f5f9ff,#e1ecfa); color: var(--blue); border-radius: 5px; }
.task-symbol .ic { width: 20px; height: 20px; }
.task-arrow { position: absolute; top: 17px; right: 17px; color: #6583a8; line-height: 0; }
.task-arrow .ic { width: 16px; height: 16px; }
.recent { background: #fff; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.recent-empty,.recent-item { display: flex; align-items: center; gap: 12px; min-height: 63px; padding: 12px 20px; font-size: 15px; }
.recent-empty .ic,.recent-item .ic { color: var(--blue); }
.recent-empty p { color: var(--muted); }
.recent-item:hover { background: #f2f7ff; }
.recent-item strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: normal; }
.recent-item+.recent-item { border-top: 1px solid var(--line); }
.recent-item small { margin-left: auto; color: var(--muted); white-space: nowrap; }
.ghost,.text-link,.copy,.retry { color: var(--blue-hover); }
.ghost { margin-left: auto; white-space: nowrap; padding: 4px 1px; font-size: 14px; }
.ghost:hover,.text-link:hover,.copy:hover,.retry:hover { text-decoration: underline; }
footer { color: var(--muted); margin: 26px 0 24px; font-size: 13px; }
footer span { margin: 0 6px; }
body.chat-mode { overflow: hidden; }
.chat-mode .top-inner { width: 100%; max-width: none; }
.chat-shell { height: calc(100vh - var(--header)); height: calc(100dvh - var(--header)); display: grid; grid-template-columns: clamp(220px,20vw,282px) minmax(0,1fr); background: #fff; }
.sidebar { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: linear-gradient(148deg,#172e50,#0c1b34 82%); padding: 26px 18px 17px; color: #edf4ff; }
.side-head,.chat-head,.compose-foot,.compose-note,.modal-head,.wrap-actions { display: flex; align-items: center; gap: 10px; }
.side-head { justify-content: space-between; padding: 0 4px; }
.side-head h2 { font-size: 23px; letter-spacing: .06em; }
.new-chat { display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid #5686cf; border-radius: 5px; font-weight: bold; padding: 10px; margin: 19px 0 25px; }
.new-chat .ic { width: 18px; }
.sidebar h3 { font-size: 13px; margin: 0 6px 7px; color: #b7cae5; font-weight: normal; letter-spacing: .08em; }
.history { flex: 1; overflow-y: auto; }
.history p { color: #bdcde3; font-size: 14px; padding: 6px; }
.history a { display: flex; align-items: center; gap: 9px; margin-bottom: 3px; padding: 10px; border-left: 2px solid transparent; border-radius: 3px; color: #deebff; font-size: 14px; }
.history a .ic { width: 16px; height: 16px; color: #9bb9e4; }
.history a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history a:hover { background: #203a5e; }
.history a.current { background: #274770; border-left-color: #84b4ff; color: #fff; }
.backhome { border-top: 1px solid #334763; display: flex; align-items: center; justify-content: space-between; padding: 15px 6px 0; margin-top: 14px; color: #c5d5ed; font-size: 14px; }
.backhome:hover { color: #fff; }
.conversation { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0,1fr) auto; background: #fcfdff; }
.chat-head { min-height: 62px; padding: 10px clamp(16px,3.2vw,52px); background: #fff; border-bottom: 1px solid var(--line); }
.chat-head h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 21px; line-height: 1.4; min-width: 0; }
.model-tag { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; flex: none; white-space: nowrap; padding: 4px 9px; font-size: 12px; color: var(--blue-hover); background: var(--pale); border: 1px solid #d1dff3; border-radius: 4px; }
.model-tag::before { content: ""; width: 5px; height: 5px; background: var(--blue); transform: rotate(45deg); }
.icon-only { display: inline-grid; place-items: center; flex: none; width: 35px; height: 35px; border-radius: 5px; color: var(--muted); }
.show-side,.close-side,.scrim { display: none; }
.feed { min-height: 0; overflow: auto; overscroll-behavior: contain; }
.feed-inner { width: min(var(--reader),100%); margin: auto; padding: 0 25px; }
.feed:not(.has-messages) { display: flex; background-color: #f7faff; background-image: radial-gradient(ellipse at center,rgba(255,255,255,.98) 8%,rgba(250,252,255,.48) 60%,transparent),linear-gradient(#e1eaf64f 1px,transparent 1px),linear-gradient(90deg,#e1eaf64f 1px,transparent 1px); background-size: auto,30px 30px,30px 30px; }
.feed:not(.has-messages) .feed-inner { padding-block: 25px; }
.welcome { max-width: 560px; margin: auto; text-align: center; }
.welcome-logo { display: inline-flex; position: relative; justify-content: center; align-items: center; padding: 7px 15px; margin-bottom: 13px; }
.welcome-logo img { display: block; width: 108px; height: auto; }
.welcome-logo::before,.welcome-logo::after { position: absolute; content: ""; width: 10px; height: 10px; border-color: #87aadb; border-style: solid; }
.welcome-logo::before { top: 0; left: 0; border-width: 1px 0 0 1px; }
.welcome-logo::after { bottom: 0; right: 0; border-width: 0 1px 1px 0; }
.welcome h2 { font-size: clamp(24px,2.7vw,40px); letter-spacing: .045em; line-height: 1.45; }
.welcome>p { font-size: 15px; color: var(--muted); margin: 5px 0 20px; }
.starter-grid { max-width: 470px; margin: auto; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.starter { display: flex; align-items: center; gap: 9px; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; background: #fff; font-size: 15px; }
.starter .task-symbol { width: 28px; height: 28px; border: 0; }
.starter .task-symbol .ic { width: 17px; height: 17px; }
.starter>.ic { margin-left: auto; color: #637d9e; }
.messages { padding: 24px 0 32px; }
.messages:empty { display: none; }
.turn+.turn { margin-top: 33px; }
.question { margin: 0 0 25px auto; width: fit-content; max-width: 89%; background: #e9f1ff; color: #173963; border: 1px solid #cddff8; border-radius: 11px 11px 2px 11px; padding: 10px 15px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; }
.assistant-head { display: flex; gap: 9px; align-items: center; font-size: 14px; font-weight: bold; color: #284571; margin-bottom: 8px; }
.ai-mark { width: 46px; height: 21px; display: inline-grid; place-items: center; background: #eff5ff; border: 1px solid #d2e1f3; border-radius: 3px; }
.ai-mark img { width: 36px; height: auto; display: block; }
.answer { color: #1d2e47; font-size: 16px; line-height: 1.85; overflow-wrap: anywhere; }
.answer p,.answer ul,.answer ol,.answer blockquote,.answer pre,.answer .table-scroll { margin: .6em 0; }
.answer h2,.answer h3,.answer h4 { margin: .85em 0 .25em; line-height: 1.48; }
.answer h2 { font-size: 1.27em; }
.answer h3 { font-size: 1.14em; }
.answer ol,.answer ul { padding-left: 1.75em; }
.answer p { white-space: pre-line; }
.answer code { padding: .06em .28em; color: #1c447d; background: #eaf1fa; border-radius: 2px; }
.answer pre { white-space: pre; max-width: 100%; overflow-x: auto; background: #14253e; color: #ebf3ff; padding: 13px 16px; border-radius: 6px; }
.answer pre code { padding: 0; background: transparent; color: inherit; }
.answer blockquote { padding-left: 12px; border-left: 3px solid #7fa4d7; color: var(--muted); }
.answer .table-scroll { overflow: auto; }
.answer table { border-collapse: collapse; font-size: .94em; }
.answer th,.answer td { padding: 5px 12px; min-width: 5em; border: 1px solid var(--line); text-align: left; }
.answer th { background: var(--pale); }
.answer a { color: var(--blue-hover); text-decoration: underline; }
.answer hr { border: 0; border-top: 1px solid var(--line); }
.answer-actions,.copy { display: flex; align-items: center; gap: 6px; }
.answer-actions { margin-top: 7px; gap: 16px; }
.copy,.retry,.state-text { font-size: 13px; }
.state-text { color: var(--muted); }
.state-text.error,.form-note.error { color: #932d3f; }
.compose-area { width: min(var(--reader),100%); margin: auto; padding: 13px 25px max(12px,env(safe-area-inset-bottom)); }
.compose { background: #fff; border: 1px solid #aebfda; border-radius: 9px; box-shadow: 0 4px 18px rgba(19,52,99,.07); }
.compose:focus-within { border-color: var(--blue); box-shadow: 0 0 0 2px #dbe8fb; }
.compose textarea { display: block; width: 100%; border: 0; background: transparent; resize: vertical; max-height: min(22vh,175px); min-height: 56px; padding: 13px 15px 3px; font-size: 16px; line-height: 1.45; color: var(--ink); }
.compose textarea:focus-visible { outline: 0; }
.compose textarea::placeholder,.fields input::placeholder { color: #677b96; opacity: 1; }
.compose-foot { justify-content: space-between; padding: 3px 9px 8px 14px; }
.compose-foot>span { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.compose-foot>span .ic { color: var(--blue); }
.send { width: 32px; height: 32px; border-radius: 5px; display: inline-grid; place-items: center; }
.compose-note { justify-content: space-between; margin-top: 6px; gap: 8px; font-size: 12px; color: var(--muted); }
.notice,.form-note { margin: 0 0 7px; padding: 7px 11px; border-left: 3px solid var(--blue); background: #eaf2ff; color: #2b496d; font-size: 14px; }
.notice:empty { display: none; }
dialog { width: min(455px,calc(100% - 32px)); max-height: calc(100dvh - 36px); margin: auto; padding: 23px 27px 26px; color: var(--ink); background: #fff; border: 1px solid #aec3e1; border-top: 3px solid var(--blue); border-radius: 8px; box-shadow: 0 20px 75px #0b1e3d3b; }
dialog::backdrop { background: rgb(8 23 47 / 53%); }
.modal-brand img { display: block; width: 77px; height: auto; margin-bottom: 13px; }
.modal-head { justify-content: space-between; }
.modal-head h2 { font-size: 24px; }
.modal-body { margin-top: 9px; }
.modal-body p { font-size: 15px; color: var(--muted); margin-bottom: 14px; }
.fields { display: grid; gap: 13px; }
.fields label { font-size: 14px; font-weight: bold; display: grid; gap: 4px; }
.fields input,.lookup { width: 100%; min-width: 0; border: 1px solid #b9c9dc; border-radius: 4px; padding: 9px 10px; background: #fff; color: var(--ink); font-size: 16px; font-weight: normal; }
.primary,.secondary { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 4px; padding: 9px 13px; font-size: 15px; }
.primary { border: 1px solid var(--blue); }
.secondary { color: var(--blue-hover); border: 1px solid var(--line); background: #fff; }
.wrap-actions { flex-wrap: wrap; }
.form-note { margin: 12px 0 0; }
.form-note.error { background: #fff1f2; border-color: #b14a56; }
.user-grid { margin-top: 11px; }
.user-row { border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 9px 0; }
.user-info { flex: 1; min-width: 85px; overflow-wrap: anywhere; }
.user-info strong,.user-info small { display: block; }
.user-info small { color: var(--muted); }
.user-row button { padding: 3px 5px; color: var(--blue-hover); font-size: 13px; }
.toast { position: fixed; z-index: 8; bottom: 17px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 30px); padding: 9px 15px; border-radius: 5px; background: #162d50; color: #fff; box-shadow: 0 3px 18px #11294825; font-size: 14px; }
.clip-temp { position: fixed; top: 0; left: -9999px; }
@media (max-width: 900px) {
  .top-inner { gap: 28px; }
  .tasks { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .task-card { min-height: 133px; }
  .chat-shell { grid-template-columns: 205px minmax(0,1fr); }
}
@media (max-width: 700px) {
  :root { --header: 61px; --gutter: 16px; }
  .top-inner { gap: 21px; }
  .brand { gap: 8px; }
  .brand-logo { width: 79px; }
  .brandstack { padding-left: 8px; }
  .brandstack strong { font-size: 14px; }
  .brandstack small { font-size: 10px; }
  .topnav { gap: 14px; }
  .topnav a { font-size: 14px; }
  .account { padding: 6px 8px; gap: 4px; }
  .account-chevron { display: none; }
  .home { padding-top: 20px; }
  .date { font-size: 12px; gap: 4px; }
  .hero { min-height: 265px; }
  .hero-art { background-position: 62% 50%; }
  .hero::before { background: linear-gradient(90deg,rgba(5,18,41,.94),rgba(7,24,50,.80) 20%,rgba(9,27,56,.34) 54%,transparent); }
  .hero-copy { padding: 33px 26px; }
  .hero h2 { font-size: 47px; }
  .hero p { max-width: 15em; }
  .task-section,.recent-section { margin-top: 22px; }
  .section-title h2 { font-size: 20px; }
  .task-card { padding: 13px; }
  .task-arrow { top: 13px; right: 13px; }
  .recent-empty,.recent-item { padding: 10px 13px; gap: 8px; }
  .chat-shell { display: block; position: relative; }
  .conversation { height: 100%; }
  .sidebar { position: absolute; z-index: 4; inset: 0 auto 0 0; width: min(275px,84vw); visibility: hidden; transform: translateX(-100%); }
  .sidebar.open { visibility: visible; transform: translateX(0); }
  .scrim { display: block; position: absolute; z-index: 3; inset: 0; width: 100%; height: 100%; background: #11264260; }
  .show-side,.close-side { display: inline-grid; }
  .close-side { color: #e3ecfa; }
  .close-side:hover { background: #254872; }
  .chat-head { min-height: 49px; gap: 7px; }
  .chat-head h1 { font-size: 18px; }
  .feed-inner { padding-inline: 16px; }
  .compose-area { padding: 8px 13px max(9px,env(safe-area-inset-bottom)); }
}
@media (max-width: 490px) {
  :root { --gutter: 13px; }
  .top-inner { gap: 14px; }
  .brandstack small { display: none; }
  .brandstack strong { font-size: 13px; letter-spacing: .02em; }
  .topnav { gap: 12px; }
  .account { font-size: 13px; }
  .account span { max-width: 4em; }
  .hero-art { background-position: 61% 18%; background-size: auto 83%; background-repeat: no-repeat; }
  .hero { min-height: 297px; align-items: flex-end; }
  .hero::before { background: linear-gradient(0deg,#07172f 15%,rgba(5,19,42,.89) 32%,rgba(7,22,47,.25) 65%,rgba(7,22,47,.02)); }
  .hero-copy { padding: 24px 23px; }
  .model-kicker { font-size: 13px; }
  .hero h2 { margin: 5px 0; font-size: 43px; }
  .hero p { max-width: none; font-size: 14px; }
  .hero-button { margin-top: 13px; font-size: 14px; padding: 7px 12px; }
  .task-card strong { font-size: 17px; }
  .task-card small { font-size: 13px; }
  .task-card { min-height: 136px; }
  .recent-empty p { font-size: 13px; }
  .keys { display: none; }
  .welcome h2 { font-size: 27px; }
  .starter { padding: 7px; }
  .compose-note { font-size: 11px; }
}
@media (max-width: 390px) {
  .brandstack { display: none; }
  .account { margin-left: auto; }
  .date .ic { display: none; }
  .hero p { max-width: 19em; }
}
@media (max-height: 670px) {
  .feed:not(.has-messages) .feed-inner { padding-block: 16px; }
  .welcome-logo { margin-bottom: 5px; }
  .welcome>p { margin-bottom: 12px; }
}

