:root {
  --bg: #0d1117;
  --panel: #121820;
  --panel-2: #171f29;
  --panel-3: #1d2732;
  --line: #2c3845;
  --line-soft: #222d38;
  --text: #e5edf4;
  --muted: #8fa0b1;
  --blue: #3b82f6;
  --blue-strong: #60a5fa;
  --green: #36c690;
  --amber: #efb45b;
  --red: #f17474;
  --paper: #cad5df;
}

/* User-selectable dark theme. */
.theme-toggle {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  padding: 0;
  border: 1px solid #dce5e0;
  border-radius: 50%;
  color: #506159;
  background: #fff;
  cursor: pointer;
  transition: color .22s ease, background-color .22s ease, border-color .22s ease, transform .22s ease, box-shadow .22s ease;
}
.theme-toggle:hover { border-color: #b9d5cb; color: #206b58; background: #edf7f3; transform: translateY(-1px) rotate(-7deg); box-shadow: 0 7px 18px rgba(38, 91, 71, .1); }
.theme-icon { grid-area: 1 / 1; font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-weight: 400; line-height: 1; transition: opacity .2s ease, transform .28s ease; }
.theme-icon-sun { opacity: 0; transform: rotate(-35deg) scale(.72); }
html[data-theme="dark"] .theme-icon-moon { opacity: 0; transform: rotate(35deg) scale(.72); }
html[data-theme="dark"] .theme-icon-sun { opacity: 1; transform: rotate(0) scale(1); }

body, .app-shell, .global-header, .sidebar, .main-area, .context-bar, .topbar, .conversation-tools,
.chat-scroll, .composer-wrap, .composer, .module-card, .billing-section, .settings-layout,
.auth-panel, .dialog-card, .announcement-dialog, input, select, textarea {
  transition: color .28s ease, background-color .28s ease, border-color .28s ease, box-shadow .28s ease;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101412;
  --panel: #171c1a;
  --panel-2: #1b211e;
  --panel-3: #222925;
  --line: #35403b;
  --line-soft: #29322e;
  --text: #e7eeea;
  --muted: #8f9b95;
  --blue: #65b49d;
  --blue-strong: #9ed7c6;
  --green: #65b49d;
  --amber: #e2b55f;
  --red: #e0847b;
  --paper: #cbd5d0;
}
html[data-theme="dark"] body { color: #e7eeea; background: #101412; }
html[data-theme="dark"] .app-shell { background: #101412; }
html[data-theme="dark"] .global-header { border-color: #28312d; background: rgba(20, 25, 23, .97); box-shadow: 0 5px 24px rgba(0, 0, 0, .16); }
html[data-theme="dark"] .global-site-banner { background: transparent; }
html[data-theme="dark"] .global-site-banner-inner { border-color: #27302b; color: #8f9b95; background: #0b0e0c; }
html[data-theme="dark"] .global-site-banner-mark { color: #65b49d; }
html[data-theme="dark"] .global-site-banner strong { color: #cbd5d0; }
html[data-theme="dark"] .global-brand { color: #edf3f0; }
html[data-theme="dark"] .global-brand small { color: #85918b; }
html[data-theme="dark"] .module-tab { color: #abb6b0; }
html[data-theme="dark"] .module-tab:hover { color: #8ed1be; background: #1b2823; }
html[data-theme="dark"] .module-tab.active { border-color: #34584d; color: #a9dfcf; background: #1c302a; box-shadow: 0 5px 16px rgba(0, 0, 0, .13); }
html[data-theme="dark"] .balance-tab { border-color: #594b30; background: #282217; }
html[data-theme="dark"] .balance-tab strong { color: #e2b55f; }
html[data-theme="dark"] .theme-toggle { border-color: #3a4641; color: #f0c66f; background: #1c2320; }
html[data-theme="dark"] .theme-toggle:hover { border-color: #6c5b36; color: #ffd584; background: #292419; box-shadow: 0 7px 18px rgba(0, 0, 0, .2); }

html[data-theme="dark"] .sidebar, html[data-theme="dark"] .context-bar { border-color: #29322e; background: #141917; }
html[data-theme="dark"] .main-area { background: #111513; }
html[data-theme="dark"] .dialogue-subnav { border-color: #303b36; background: #1b211e; }
html[data-theme="dark"] .dialogue-subnav .side-link { color: #8f9b95; }
html[data-theme="dark"] .dialogue-subnav .side-link:hover { color: #a9dccc; background: #202a26; }
html[data-theme="dark"] .dialogue-subnav .side-link.active { color: #b5e5d6; background: #26332e; box-shadow: 0 4px 12px rgba(0, 0, 0, .18); }
html[data-theme="dark"] .search-box, html[data-theme="dark"] .section-label { color: #7f8b85; }
html[data-theme="dark"] .search-box input,
html[data-theme="dark"] input, html[data-theme="dark"] select, html[data-theme="dark"] textarea { border-color: #35413b; color: #e0e8e4; background: #171c1a; }
html[data-theme="dark"] input:focus, html[data-theme="dark"] select:focus, html[data-theme="dark"] textarea:focus { border-color: #4f9c86; box-shadow: 0 0 0 4px rgba(63, 151, 125, .12); }
html[data-theme="dark"] .conversation-item { color: #adb8b2; }
html[data-theme="dark"] .conversation-item:hover { border-color: #303b36; background: #1c2421; }
html[data-theme="dark"] .conversation-item.active { border-color: #355c50; color: #bce5d8; background: #1c302a; }
html[data-theme="dark"] .sidebar-foot, html[data-theme="dark"] .sidebar-account { border-color: #29322e; }
html[data-theme="dark"] .account-avatar { border-color: #3c6257; color: #a9dccc; background: #1d302a; }

html[data-theme="dark"] .topbar { border-color: #29322e; background: #151a18; }
html[data-theme="dark"] .topic h1, html[data-theme="dark"] .page-heading h2 { color: #eaf1ed; }
html[data-theme="dark"] .topic span { color: #849089; }
html[data-theme="dark"] .quiet-button, html[data-theme="dark"] .icon-button,
html[data-theme="dark"] .attach-button, html[data-theme="dark"] .stop-button { border-color: #35413b; color: #b8c3bd; background: #181e1b; }
html[data-theme="dark"] .quiet-button:hover, html[data-theme="dark"] .icon-button:hover,
html[data-theme="dark"] .attach-button:hover { border-color: #497667; color: #aee0d1; background: #1e2a26; }
html[data-theme="dark"] .conversation-tools { border-color: #28312d; background: #131816; }
html[data-theme="dark"] .field-inline, html[data-theme="dark"] .team-switch { color: #9da9a3; }
html[data-theme="dark"] .chat-scroll, html[data-theme="dark"] .composer-wrap { border-color: #29322e; background: #111513; }
html[data-theme="dark"] .empty-state h2 { color: #e8efeb; }
html[data-theme="dark"] .empty-state p, html[data-theme="dark"] .page-copy { color: #8e9a94; }
html[data-theme="dark"] .empty-index { color: #9ed7c6; background: #1c302a; }
html[data-theme="dark"] .starter-grid button { border-color: #303a35; color: #b7c2bc; background: #171c1a; }
html[data-theme="dark"] .starter-grid button:hover { border-color: #416c5f; color: #bce7da; background: #1c2925; }
html[data-theme="dark"] .composer { border-color: #36423c; background: #181d1b; box-shadow: 0 10px 32px rgba(0, 0, 0, .22); }
html[data-theme="dark"] .composer:focus-within { border-color: #4f9c86; box-shadow: 0 12px 36px rgba(0, 0, 0, .26); }
html[data-theme="dark"] .composer-actions { border-color: #2c3531; }

html[data-theme="dark"] .message-content, html[data-theme="dark"] .message.assistant .message-content { color: #d6dfda; }
html[data-theme="dark"] .message.user .message-content { border-color: #35413b; color: #e5ece8; background: #202825; }
html[data-theme="dark"] .message-content h1, html[data-theme="dark"] .message-content h2,
html[data-theme="dark"] .message-content h3, html[data-theme="dark"] .message-content h4,
html[data-theme="dark"] .message-content strong { color: #edf3f0; }
html[data-theme="dark"] .message-content code { color: #a9ddce; background: #1a2a25; }
html[data-theme="dark"] .message-content pre { border-color: #303b36; background: #121715; }
html[data-theme="dark"] .message-content pre code { color: #d6dfda; }
html[data-theme="dark"] .message-content th { color: #e7eeea; background: #1c2b26; }
html[data-theme="dark"] .message-thinking-body { border-color: #35403b; }
html[data-theme="dark"] .message-run-status { color: #8f9b95; }
html[data-theme="dark"] .message-worklog-entry { color: #d6dfda; }
html[data-theme="dark"] .message-file-card, html[data-theme="dark"] .message.user .message-file-card,
html[data-theme="dark"] .files-list .message-file-card { border-color: #334039; color: #d6dfda; background: #181e1b; }
html[data-theme="dark"] .message-file-card:hover { border-color: #467263; background: #1d2824; }
html[data-theme="dark"] .message-file-copy strong { color: #e5ece8; }
html[data-theme="dark"] .message-file-copy small { color: #849089; }
html[data-theme="dark"] .message-file-icon { color: #9fd6c6; background: #20332d; }

html[data-theme="dark"] .home-kicker, html[data-theme="dark"] .status-pill { color: #a7ddcd; background: #1c302a; }
html[data-theme="dark"] .home-intro h1, html[data-theme="dark"] .development-view h2 { color: #edf3f0; }
html[data-theme="dark"] .home-intro p, html[data-theme="dark"] .development-view p { color: #929e98; }
html[data-theme="dark"] .module-card, html[data-theme="dark"] .resource-card,
html[data-theme="dark"] .agent-card, html[data-theme="dark"] .wallet-summary > div,
html[data-theme="dark"] .billing-section, html[data-theme="dark"] .settings-layout { border-color: #303a35; color: #dce5e0; background: #171c1a; box-shadow: 0 9px 25px rgba(0, 0, 0, .16); }
html[data-theme="dark"] .module-card:hover, html[data-theme="dark"] .resource-card:hover,
html[data-theme="dark"] .agent-card:hover { border-color: #416c5f; box-shadow: 0 17px 34px rgba(0, 0, 0, .22); }
html[data-theme="dark"] .module-card strong, html[data-theme="dark"] .resource-card h3,
html[data-theme="dark"] .agent-card h3 { color: #e7eeea; }
html[data-theme="dark"] .module-card p, html[data-theme="dark"] .resource-card p,
html[data-theme="dark"] .agent-card p { color: #8f9b95; }
html[data-theme="dark"] .development-icon { color: #a7ddcd; background: #1c302a; box-shadow: 0 12px 30px rgba(0, 0, 0, .18); }
html[data-theme="dark"] .development-view button { border-color: #3a4641; color: #addccc; background: #181e1b; }
html[data-theme="dark"] .development-view button:hover { border-color: #4b7568; background: #1d2925; }

html[data-theme="dark"] .wallet-summary span, html[data-theme="dark"] .setting-row span { color: #8f9b95; }
html[data-theme="dark"] .wallet-summary strong { color: #8ed2bd; }
html[data-theme="dark"] .setting-row, html[data-theme="dark"] .data-row { border-color: #2d3732; }
html[data-theme="dark"] .setting-row strong, html[data-theme="dark"] .data-row strong { color: #dbe4df; }
html[data-theme="dark"] .billing-mode-notice { color: #a9b5ae; background: #1c2421; }
html[data-theme="dark"] .team-person { color: #b7c3bd; background: #1c2824; }
html[data-theme="dark"] .context-heading { color: #abb7b1; }

html[data-theme="dark"] .modal-backdrop { background: rgba(3, 6, 5, .66); }
html[data-theme="dark"] .auth-panel, html[data-theme="dark"] .dialog-card,
html[data-theme="dark"] .announcement-dialog { border-color: #35403b; color: #dce5e0; background: #171c1a; box-shadow: 0 24px 70px rgba(0, 0, 0, .42); }
html[data-theme="dark"] .auth-tabs { background: #222925; }
html[data-theme="dark"] .auth-tabs button { color: #909c96; }
html[data-theme="dark"] .auth-tabs button.active { color: #afe0d1; background: #2a332f; }
html[data-theme="dark"] .announcement-header { border-color: #303a35; background: #1b211e; }
html[data-theme="dark"] .announcement-summary, html[data-theme="dark"] .announcement-item,
html[data-theme="dark"] .announcement-detail-meta, html[data-theme="dark"] .announcement-detail-foot { border-color: #303a35; }
html[data-theme="dark"] .announcement-item { color: #dce5e0; }
html[data-theme="dark"] .announcement-item:hover, html[data-theme="dark"] .announcement-item.unread { background: #1c2824; }
html[data-theme="dark"] .announcement-item.unread .announcement-copy strong { color: #edf3f0; }
html[data-theme="dark"] .announcement-detail-content { color: #cbd5d0; }
html[data-theme="dark"] .announcement-detail-foot { background: #171c1a; }

html[data-theme="dark"] * { scrollbar-color: #46534d transparent; }
html[data-theme="dark"] *::-webkit-scrollbar-thumb { border-color: transparent; background: #46534d; background-clip: padding-box; }
html[data-theme="dark"] *::-webkit-scrollbar-thumb:hover { background-color: #5b6962; }
html[data-theme="dark"] .run-option,
html[data-theme="dark"] .field-inline + .field-inline { border-color: #303a35; }
html[data-theme="dark"] .team-switch span { border-color: #3b4842; background: #252d29; }
html[data-theme="dark"] .team-switch span::after { background: #87938d; box-shadow: 0 2px 5px rgba(0, 0, 0, .28); }
html[data-theme="dark"] .team-switch input:checked + span { border-color: #4e9c86; background: #2e7f69; }
html[data-theme="dark"] .team-switch input:checked + span::after { background: #d5e9e2; }
html[data-theme="dark"] .conversation-delete { border-color: #653d3b; color: #f1a39c; background: #2c1d1c; }
html[data-theme="dark"] .conversation-delete:hover { border-color: #96504b; color: #ffd7d3; background: #482725; }
html[data-theme="dark"] .attachment-chip,
html[data-theme="dark"] .message-attachment { border-color: #36594f; color: #a7dacb; background: #1b2b26; }
html[data-theme="dark"] .attachment-chip button { color: #8dc8b7; }
html[data-theme="dark"] .new-message-notice { border-color: #416d60; color: #b6e2d5; background: #1d302a; box-shadow: 0 7px 20px rgba(0, 0, 0, .2); }
html[data-theme="dark"] .context-bar section { border-color: #303a35; }
html[data-theme="dark"] .sidebar-foot > .side-link { border-color: #303a35; }

@media (prefers-reduced-motion: reduce) {
  .theme-toggle, .theme-icon { transition: none; }
}

/* Graduation project market */
.market-shell { width:min(1440px,100%); margin:0 auto; padding:12px clamp(18px,4vw,64px) 76px; }
.market-hero { display:flex; align-items:flex-start; justify-content:space-between; gap:28px; padding:8px 0 18px; }
.market-hero h2 { margin:9px 0 8px; color:var(--text); font-size:clamp(28px,3.5vw,44px); letter-spacing:0; }
.market-hero p { max-width:720px; margin:0; color:var(--muted); line-height:1.65; }
.market-tabs { display:flex; align-items:center; gap:8px; margin-bottom:22px; border-bottom:1px solid var(--line-soft); }
.market-tabs button { min-width:92px; padding:12px 17px; border:0; border-bottom:2px solid transparent; border-radius:0; color:var(--muted); background:transparent; text-align:center; white-space:nowrap; }
.market-tabs button.active { border-bottom-color:var(--blue); color:var(--text); }
.market-tabs .primary-button { width:auto; min-width:0; margin-left:auto; padding:8px 14px; border-radius:7px; color:#fff; background:var(--blue); font-size:12px; text-align:center; white-space:nowrap; }
.market-view { min-width:0; }
.market-toolbar { display:grid; grid-template-columns:minmax(220px,1fr) 170px 160px; gap:10px; margin-bottom:22px; }
.market-select { position:relative; min-width:0; }
.market-native-select { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; overflow:hidden; opacity:0 !important; pointer-events:none; }
.market-select-trigger { position:relative; display:block; width:100%; min-height:40px; padding:0 38px 0 16px; overflow:hidden; border:1px solid #dce5e0; border-radius:999px; color:#24302a; background:#fff; cursor:pointer; font:inherit; text-align:center; text-overflow:ellipsis; white-space:nowrap; }
.market-select-trigger::after { position:absolute; top:50%; right:14px; width:7px; height:7px; border-right:1.5px solid #6c7d74; border-bottom:1.5px solid #6c7d74; content:""; transform:translateY(-65%) rotate(45deg); transition:transform .18s ease; }
.market-select.open .market-select-trigger { border-color:#67ad9b; box-shadow:0 0 0 4px rgba(64,148,126,.1); }
.market-select.open .market-select-trigger::after { transform:translateY(-25%) rotate(225deg); }
.market-select-menu { position:absolute; z-index:20; top:calc(100% + 8px); right:0; left:0; display:none; gap:3px; padding:6px; border:1px solid #d8e5df; border-radius:12px; background:#fff; box-shadow:0 14px 30px rgba(31,73,57,.16); }
.market-select.open .market-select-menu { display:grid; }
.market-select-option { width:100%; min-height:34px; padding:7px 9px; border:0; border-radius:7px; color:#526058; background:transparent; cursor:pointer; font-size:13px; text-align:center; }
.market-select-option:hover, .market-select-option[aria-selected="true"] { color:#176650; background:#eaf6f1; }
.app-select { position:relative; display:block; width:100%; min-width:0; }
.app-native-select { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; overflow:hidden; opacity:0 !important; pointer-events:none; }
.app-select-trigger { position:relative; display:block; width:100%; min-height:40px; padding:0 38px 0 16px; overflow:hidden; border:1px solid #dce5e0; border-radius:10px; color:#24302a; background:#fff; cursor:pointer; font:inherit; text-align:left; text-overflow:ellipsis; white-space:nowrap; }
.app-select-trigger::after { position:absolute; top:50%; right:14px; width:7px; height:7px; border-right:1.5px solid #6c7d74; border-bottom:1.5px solid #6c7d74; content:""; transform:translateY(-65%) rotate(45deg); transition:transform .18s ease; }
.app-select.open .app-select-trigger { border-color:#67ad9b; box-shadow:0 0 0 4px rgba(64,148,126,.1); }
.app-select.open .app-select-trigger::after { transform:translateY(-25%) rotate(225deg); }
.app-select-menu { position:absolute; z-index:30; top:calc(100% + 7px); right:0; left:0; display:none; gap:3px; max-height:260px; padding:6px; overflow-y:auto; border:1px solid #d8e5df; border-radius:10px; background:#fff; box-shadow:0 14px 30px rgba(31,73,57,.16); }
.app-select.open .app-select-menu { display:grid; }
.app-select-option { width:100%; min-height:34px; padding:7px 10px; border:0; border-radius:6px; color:#526058; background:transparent; cursor:pointer; font-size:13px; text-align:left; }
.app-select-option:hover, .app-select-option[aria-selected="true"] { color:#176650; background:#eaf6f1; }
.field-inline .app-select { width:132px; flex:0 0 132px; }
.run-option #run-reasoning + .app-select, .run-option .app-select:has(.app-native-select#run-reasoning) { width:78px; flex-basis:78px; }
.market-search { display:flex; align-items:center; gap:8px; padding:0 12px; border:1px solid var(--line-soft); border-radius:8px; color:var(--muted); background:var(--panel); }
.market-search input { min-width:0; padding:11px 0; border:0; background:transparent; box-shadow:none; }
.market-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; }
.market-card-item { min-width:0; overflow:hidden; border:1px solid var(--line-soft); border-radius:12px; background:var(--panel); cursor:pointer; transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease; }
.market-card-item:hover { border-color:var(--blue); box-shadow:0 15px 34px rgba(28,66,95,.12); transform:translateY(-2px); }
.market-card-cover { position:relative; display:grid; height:190px; place-items:center; overflow:hidden; color:var(--muted); background:var(--panel-2); }
.market-card-cover img { width:100%; height:100%; object-fit:cover; }
.market-price-badge { position:absolute; right:10px; bottom:10px; padding:5px 9px; border-radius:7px; color:#fff; background:rgba(28,32,34,.75); font-size:12px; }
.market-card-body { padding:15px 16px 16px; }
.market-card-body h3 { margin:0; overflow:hidden; color:var(--text); font-size:16px; text-overflow:ellipsis; white-space:nowrap; }
.market-card-body p { display:-webkit-box; min-height:42px; margin:9px 0 15px; overflow:hidden; color:var(--muted); font-size:12px; line-height:1.6; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.market-card-foot { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.market-card-foot span { padding:4px 8px; border-radius:5px; color:var(--blue); background:color-mix(in srgb,var(--blue) 10%,transparent); font-size:11px; }
.market-card-foot small { color:var(--muted); }
.market-empty { grid-column:1/-1; padding:90px 10px; text-align:center; }
.market-pagination { display:flex; align-items:center; justify-content:center; gap:14px; margin:26px auto 0; }
.market-pagination button { min-width:76px; padding:8px 12px; border:1px solid #dce5e0; border-radius:8px; color:#3d6255; background:#fff; cursor:pointer; font-size:12px; }
.market-pagination button:hover:not(:disabled) { border-color:#8fc4b0; color:#176650; background:#eef7f2; }
.market-pagination button:disabled { cursor:not-allowed; opacity:.42; }
.market-pagination span { min-width:60px; color:var(--muted); font-size:12px; text-align:center; }
.market-section-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin:12px 0 20px; }
.market-section-heading h3 { margin:0 0 7px; color:var(--text); font-size:22px; }
.market-section-heading p { margin:0; color:var(--muted); }
.market-library-group + .market-library-group { margin-top:34px; padding-top:26px; border-top:1px solid var(--line-soft); }
.market-library-group > header { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin-bottom:16px; }
.market-library-group h4 { margin:0; color:var(--text); font-size:17px; }
.market-library-group header span { color:var(--muted); font-size:12px; }
.market-reward-note { color:var(--green); font-size:13px; }
.market-upload-form { display:grid; gap:16px; max-width:960px; padding:24px; border:1px solid var(--line-soft); border-radius:12px; background:var(--panel); }
.market-upload-form label { display:grid; gap:7px; color:var(--muted); font-size:13px; }
.market-upload-form input,.market-upload-form textarea,.market-upload-form select { width:100%; }
.market-upload-form #market-upload-description { height:140px; min-height:140px; padding:12px 14px; border-radius:8px; line-height:1.65; resize:none; }
.market-form-row { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.market-upload-form fieldset { margin:0; padding:14px; border:1px solid var(--line-soft); border-radius:8px; }
.market-upload-form legend { padding:0 5px; color:var(--muted); font-size:12px; }
.market-checks { display:flex; flex-wrap:wrap; gap:15px; }
.market-checks label { display:flex; align-items:center; gap:7px; color:var(--text); }
.market-checks input { width:16px; height:16px; accent-color:var(--blue); }
.market-file-drop { position:relative; display:grid !important; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:9px 10px !important; padding:15px 16px; border:1px dashed #b9cfc5; border-radius:10px; background:#f5f9f7; cursor:pointer; transition:border-color .18s ease,background .18s ease,transform .18s ease; }
.market-file-drop:hover, .market-file-drop:focus-within { border-color:#2d8b73; background:#eef7f2; transform:translateY(-1px); }
.market-file-drop input { position:absolute; inset:0; width:100% !important; height:100%; padding:0; border:0; opacity:0; cursor:pointer; }
.file-drop-title { grid-column:1/-1; color:var(--text); font-weight:650; }
.file-drop-control { display:inline-flex; min-height:30px; align-items:center; justify-content:center; padding:5px 10px; border:1px solid #b8d8cb; border-radius:6px; color:#23745c; background:#fff; font-size:12px; font-weight:650; }
.file-drop-name { min-width:0; overflow:hidden; color:var(--muted); font-size:12px; text-overflow:ellipsis; white-space:nowrap; }
.market-file-drop small { color:var(--muted); }
.market-form-actions { display:flex; align-items:flex-start; justify-content:flex-end; gap:10px; padding-top:8px; }
.market-form-actions > .quiet-button { width:auto; min-width:52px; white-space:nowrap; }
.market-submit-stack { display:grid; min-width:220px; gap:7px; }
.market-submit-stack .primary-button { width:100%; }
.market-submit-stack .form-status { min-height:16px; margin:0; color:var(--muted); font-size:12px; line-height:1.45; text-align:center; }
.market-back { margin:0 0 18px; padding:0; border:0; color:var(--blue); background:transparent; cursor:pointer; }
.market-detail { position:relative; display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:26px; padding-bottom:50px; }
.market-detail-hero { grid-column:1/-1; display:flex; align-items:center; gap:24px; padding:18px; border:1px solid var(--line-soft); border-radius:12px; background:var(--panel); }
.market-detail-hero img { width:180px; height:130px; object-fit:cover; border-radius:8px; background:var(--panel-2); }
.market-detail-hero h2 { margin:0 0 9px; color:var(--text); font-size:28px; }
.market-detail-hero p { margin:0; color:var(--muted); }
.market-detail-section { padding:22px; border-top:1px solid var(--line-soft); }
.market-detail-section h3 { margin:0 0 12px; color:var(--text); font-size:17px; }
.market-detail-section p { margin:0; color:var(--muted); line-height:1.8; white-space:pre-wrap; }
.market-preview-section > h3 { margin-bottom:18px; }
.market-preview-group + .market-preview-group { margin-top:26px; padding-top:22px; border-top:1px solid var(--line-soft); }
.market-preview-group h4 { margin:0 0 12px; color:var(--text); font-size:14px; }
.market-preview-empty { margin:0; padding:24px; border:1px dashed var(--line-soft); color:var(--muted); text-align:center; }
.market-content-tags { display:flex; flex-wrap:wrap; gap:9px; }
.market-content-tags span { padding:6px 10px; border:1px solid var(--line-soft); border-radius:999px; color:var(--muted); font-size:12px; }
.market-gallery { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.market-gallery img { width:100%; aspect-ratio:16/10; object-fit:cover; border-radius:7px; background:var(--panel-2); }
.market-gallery img.is-broken { display:grid; place-items:center; border:1px dashed #d8e5df; color:var(--muted); object-fit:contain; }
.market-gallery img:not(.is-broken) { cursor:zoom-in; }
.market-preview-modal { z-index:30; padding:24px; }
.market-preview-dialog { position:relative; display:grid; width:min(860px,calc(100vw - 48px)); max-height:calc(100vh - 96px); gap:12px; padding:22px; border:1px solid #dfe7e3; border-radius:16px; background:#fff; box-shadow:0 24px 70px rgba(24,48,37,.2); }
.market-preview-dialog h2 { margin:0; color:var(--text); font-size:18px; }
.market-preview-dialog img { display:block; max-width:100%; max-height:calc(100vh - 190px); margin:auto; object-fit:contain; border-radius:8px; }
.market-preview-dialog p { margin:0; color:var(--muted); font-size:12px; text-align:center; }
.market-preview-close { position:absolute; top:12px; right:12px; z-index:1; }
html[data-theme="dark"] .market-preview-dialog { border-color:#35403b; background:#171c1a; box-shadow:0 24px 70px rgba(0,0,0,.42); }
.market-purchase-box { align-self:start; position:sticky; top:20px; display:grid; gap:14px; padding:24px; border:1px solid var(--line-soft); border-radius:12px; background:var(--panel); }
.market-purchase-box > span { color:var(--muted); font-size:13px; }
.market-purchase-box > strong { color:var(--blue); font-size:34px; }
.market-purchase-box > strong small { color:var(--muted); font-size:13px; font-weight:400; }
.market-purchase-box .primary-button { width:100%; text-align:center; }
.market-download-file { padding:10px; border:1px solid var(--line-soft); border-radius:7px; color:var(--muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.market-purchase-box p { margin:0; color:var(--green); font-size:13px; }
.market-help-dialog { width:min(520px,100%); }
.market-help-dialog header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.market-help-dialog h2 { margin:8px 0 0; color:var(--text); }
.market-help-dialog ol { display:grid; gap:18px; margin:24px 0; padding:0; list-style:none; }
.market-help-dialog li { display:grid; gap:5px; }
.market-help-dialog li b { color:var(--text); }
.market-help-dialog li span,.market-help-contact { color:var(--muted); line-height:1.65; }
.market-help-contact strong { color:var(--blue); }
.market-help-dialog > .primary-button { width:100%; }
html[data-theme="dark"] .market-card-item,html[data-theme="dark"] .market-upload-form,html[data-theme="dark"] .market-detail-hero,html[data-theme="dark"] .market-purchase-box,html[data-theme="dark"] .market-search { border-color:var(--line); }
html[data-theme="dark"] .market-file-drop { border-color:#36564d; background:#17211d; }
html[data-theme="dark"] .market-file-drop:hover, html[data-theme="dark"] .market-file-drop:focus-within { border-color:#55b595; background:#1b2d26; }
html[data-theme="dark"] .file-drop-control { border-color:#3e7765; color:#a8dec9; background:#17211d; }
html[data-theme="dark"] .market-select-trigger { border-color:#354a43; color:#e1e8e4; background:#171c1a; }
html[data-theme="dark"] .market-select-trigger::after { border-color:#9abbb4; }
html[data-theme="dark"] .market-select-menu { border-color:#354a43; background:#171c1a; box-shadow:0 14px 30px rgba(0,0,0,.28); }
html[data-theme="dark"] .market-select-option { color:#b7c5bd; }
html[data-theme="dark"] .market-select-option:hover, html[data-theme="dark"] .market-select-option[aria-selected="true"] { color:#d7f1e6; background:#203d33; }
html[data-theme="dark"] .market-pagination button { border-color:#354a43; color:#b7c5bd; background:#171c1a; }
html[data-theme="dark"] .market-pagination button:hover:not(:disabled) { border-color:#55b595; color:#d7f1e6; background:#203d33; }
html[data-theme="dark"] .app-select-trigger { border-color:#354a43; color:#e1e8e4; background:#171c1a; }
html[data-theme="dark"] .app-select-trigger::after { border-color:#9abbb4; }
html[data-theme="dark"] .app-select-menu { border-color:#354a43; background:#171c1a; box-shadow:0 14px 30px rgba(0,0,0,.28); }
html[data-theme="dark"] .app-select-option { color:#b7c5bd; }
html[data-theme="dark"] .app-select-option:hover, html[data-theme="dark"] .app-select-option[aria-selected="true"] { color:#d7f1e6; background:#203d33; }
@media (max-width:1050px) { .market-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:760px) { .market-shell { padding:10px 16px 48px; } .market-hero { display:block; } .market-hero .quiet-button { margin-top:12px; } .market-toolbar { grid-template-columns:1fr 1fr; } .market-search { grid-column:1/-1; } .market-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; } .market-detail { grid-template-columns:1fr; } .market-purchase-box { position:static; } .market-detail-hero img { width:120px; height:92px; } }
@media (max-width:480px) { .market-grid { grid-template-columns:1fr; } .market-form-row { grid-template-columns:1fr; } .market-tabs { overflow-x:auto; } .market-tabs button { white-space:nowrap; } .market-gallery { grid-template-columns:repeat(2,minmax(0,1fr)); } }

/* Intelligent document formatting module */
.formatting-shell { width: min(1440px, 100%); max-width: none; margin: 0 auto; padding: 36px clamp(28px, 4vw, 64px) 86px; }
.formatting-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:32px; margin-bottom:34px; text-align:left; }
.formatting-heading h2 { margin:9px 0 10px; font-size:36px; letter-spacing:0; color:var(--text); }
.formatting-heading p { margin:0; color:var(--muted); }
.formatting-layout { display:grid; grid-template-columns:minmax(0,1fr) 360px; gap:30px; align-items:start; }
.formatting-main { display:grid; gap:22px; min-width:0; width:100%; max-width:980px; margin:0 auto; }
.formatting-card, .formatting-aside > section { border:1px solid var(--line-soft); border-radius:12px; background:var(--panel); }
.formatting-card { padding:30px; }
.formatting-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:22px; margin-bottom:24px; }
.formatting-card-head h3 { margin:0 0 8px; font-size:21px; color:var(--text); }
.formatting-card-head p { margin:0; font-size:14px; color:var(--muted); }
.formatting-count { color:var(--muted); font-size:13px; white-space:nowrap; }
.formatting-search { display:grid; gap:9px; margin-bottom:20px; color:var(--muted); font-size:13px; }
.formatting-search input { width:100%; }
.formatting-template-list { display:grid; gap:12px; max-height:390px; overflow-x:hidden; overflow-y:auto; padding:2px 4px 2px 0; }
.formatting-template-option { display:flex; align-items:flex-start; gap:15px; width:100%; min-width:0; padding:18px; border:1px solid var(--line-soft); border-radius:9px; color:var(--text); background:var(--panel-2); text-align:left; cursor:pointer; transition:border-color .18s ease, background-color .18s ease; }
.formatting-template-option:hover { border-color:var(--blue); background:var(--panel-3); }
.formatting-template-option.active { border-color:var(--blue); box-shadow:0 0 0 3px color-mix(in srgb, var(--blue) 16%, transparent); background:var(--panel-3); }
.formatting-template-option input { width:16px; height:16px; flex:0 0 16px; margin:3px 0 0; padding:0; accent-color:var(--blue); }
.formatting-template-option > span { min-width:0; flex:1 1 auto; overflow:hidden; }
.formatting-template-option > span > span, .formatting-template-option > span > small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.formatting-template-option strong { display:block; margin-bottom:6px; font-size:15px; }
.formatting-template-option span, .formatting-template-option small { display:block; color:var(--muted); font-size:12px; line-height:1.45; }
.formatting-dropzone { display:grid; place-items:center; gap:10px; min-height:220px; padding:32px; border:1px dashed var(--line); border-radius:10px; color:var(--muted); text-align:center; cursor:pointer; background:var(--panel-2); }
.formatting-dropzone:hover, .formatting-dropzone.dragging { border-color:var(--blue); background:var(--panel-3); }
.formatting-dropzone strong { color:var(--text); font-size:14px; }
.formatting-dropzone u { color:var(--blue); text-underline-offset:3px; }
.formatting-dropzone small { font-size:12px; }
.formatting-upload-icon { display:grid; place-items:center; width:36px; height:36px; border-radius:50%; color:var(--blue-strong); background:color-mix(in srgb, var(--blue) 13%, transparent); font-size:22px; }
.formatting-selected { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:12px; padding:12px 14px; border:1px solid var(--line-soft); border-radius:8px; background:var(--panel-2); }
.formatting-selected strong, .formatting-selected span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.formatting-selected strong { color:var(--text); font-size:14px; }
.formatting-selected span { margin-top:4px; color:var(--muted); font-size:12px; }
.formatting-selected button { border:0; color:var(--muted); background:transparent; cursor:pointer; font-size:20px; }
.formatting-submit-bar { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:24px 30px; border:1px solid var(--line-soft); border-radius:12px; background:var(--panel-2); }
.formatting-submit-bar strong, .formatting-submit-bar span { display:block; }
.formatting-submit-bar strong { font-size:13px; color:var(--muted); }
.formatting-submit-bar span { margin-top:3px; color:var(--text); font-size:22px; font-weight:700; }
.formatting-submit-bar p { margin:5px 0 0; color:var(--muted); font-size:12px; }
.formatting-submit-bar p.error { color:var(--red); }
.formatting-submit-bar p.success { color:var(--green); }
.formatting-submit-bar > .send-button { display:inline-flex; width:auto; min-width:156px; min-height:48px; align-items:center; justify-content:center; gap:8px; padding:0 22px; border-radius:8px; font-size:14px; line-height:1; white-space:nowrap; }
.formatting-submit-bar > .send-button > span { display:inline; margin:0; font-size:18px; line-height:1; }
.formatting-submit-bar > .send-button:disabled { cursor:not-allowed; opacity:.55; transform:none; }
.formatting-aside { position:sticky; top:20px; display:grid; gap:22px; }
.formatting-aside > section { padding:28px; }
.formatting-aside h3 { margin:0 0 20px; font-size:18px; color:var(--text); }
.formatting-aside ol { display:grid; gap:22px; margin:0; padding:0; list-style:none; }
.formatting-aside li { display:grid; grid-template-columns:28px 1fr; gap:10px; }
.formatting-aside li > span { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; color:var(--blue); background:color-mix(in srgb, var(--blue) 12%, transparent); font-size:11px; font-weight:700; }
.formatting-aside li strong { display:block; margin:2px 0 4px; font-size:13px; color:var(--text); }
.formatting-aside li p, .formatting-tip p { margin:0; color:var(--muted); font-size:12px; line-height:1.6; }
.formatting-tip { border-left:3px solid var(--blue) !important; }
.formatting-tip strong { display:block; margin-bottom:6px; color:var(--text); font-size:13px; }
html[data-theme="dark"] .formatting-card, html[data-theme="dark"] .formatting-aside > section, html[data-theme="dark"] .formatting-submit-bar { border-color:var(--line); }
@media (max-width:900px) { .formatting-layout { grid-template-columns:1fr; } .formatting-main { max-width:none; } .formatting-aside { position:static; grid-template-columns:1fr 1fr; } }
@media (max-width:620px) { .formatting-shell { padding:24px 16px 42px; } .formatting-heading { display:block; } .formatting-heading .quiet-button { margin-top:16px; } .formatting-card, .formatting-submit-bar { padding:17px; } .formatting-aside { grid-template-columns:1fr; } .formatting-submit-bar { align-items:stretch; flex-direction:column; } .formatting-submit-bar > .send-button { width:100%; } }

* {
  box-sizing: border-box;
  scrollbar-color: #465767 transparent;
  scrollbar-width: thin;
}

*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  min-height: 36px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: #465767;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background-color: #5b6f81; }
*::-webkit-scrollbar-corner { background: transparent; }

html, body { height: 100%; }

.agent-pool-summary { grid-template-columns:repeat(3,minmax(0,1fr)); }
.agent-users-section, .agent-ledger-section { margin-top:18px; }
.agent-user-table { overflow:auto; border:1px solid var(--line); }
.agent-user-table table { width:100%; min-width:900px; border-collapse:collapse; }
.agent-user-table th, .agent-user-table td { padding:12px; border-bottom:1px solid var(--line-soft); text-align:left; }
.agent-user-table th { color:var(--muted); font-size:11px; }
.agent-user-table td strong, .agent-user-table td small { display:block; }
.agent-user-table td small { margin-top:4px; color:var(--muted); }
.agent-recharge-inline { display:grid; width:250px; min-width:250px; grid-template-columns:minmax(0, 1fr) 78px; gap:7px; }
.agent-recharge-inline input { width:100%; min-width:0; }
.agent-recharge-inline .primary-button { width:100%; min-width:0; padding-inline:10px; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button, input, select, textarea { font: inherit; }

button { color: inherit; }

.app-shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr) 290px;
  height: 100vh;
  overflow: hidden;
}

.sidebar, .context-bar {
  min-width: 0;
  background: #10161d;
}

.sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  padding: 16px 12px 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 8px 18px;
}

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #dce9ff;
  background: #18345a;
  border: 1px solid #2a5c9b;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
}

.brand strong { display: block; font-size: 14px; }
.brand span, .eyebrow { display: block; color: var(--muted); font-size: 10px; letter-spacing: 1px; }

.primary-button, .primary-small, .send-button {
  border: 1px solid #3f82d9;
  border-radius: 6px;
  color: white;
  background: #2869bd;
  cursor: pointer;
  font-weight: 650;
  transition: background .15s ease, opacity .15s ease;
}

.primary-button { width: 100%; padding: 10px 12px; }
.primary-small { padding: 8px 11px; }
.primary-button:hover, .primary-small:hover, .send-button:hover { background: #357bce; }
.primary-button:disabled, .primary-small:disabled, .send-button:disabled { cursor: default; opacity: .55; }

.search-box {
  display: grid;
  gap: 5px;
  padding: 16px 4px 10px;
  color: var(--muted);
  font-size: 11px;
}

.search-box input, input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: none;
  color: var(--text);
  background: #0d1218;
}

.search-box input { padding: 8px 9px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(59, 130, 246, .12); }

.side-section { min-height: 0; flex: 1; overflow-y: auto; padding: 10px 0; }
.section-label { padding: 0 8px 8px; color: var(--muted); font-size: 11px; }

.conversation-list { display: grid; gap: 2px; }

.conversation-row { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; }

.conversation-item {
  display: block;
  min-width: 0;
  width: auto;
  padding: 9px 10px;
  overflow: hidden;
  border: 0;
  border-left: 2px solid transparent;
  color: var(--paper);
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.conversation-item:hover { background: #18212a; }
.conversation-item.active { border-left-color: var(--blue-strong); background: #172332; color: white; }
.conversation-list.is-locked .conversation-item,
.conversation-list.is-locked .conversation-delete { cursor: default; }
.conversation-list.is-locked .conversation-item { opacity: .62; }
.conversation-item strong, .conversation-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conversation-item strong { font-size: 13px; font-weight: 600; }
.conversation-item small { margin-top: 4px; color: var(--muted); font-size: 11px; }

.conversation-delete {
  align-self: center;
  margin-right: 6px;
  padding: 6px 8px;
  border: 1px solid #9d3c47;
  border-radius: 4px;
  color: #ffe2e5;
  background: #7b2d36;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.conversation-delete:hover { color: #fff; background: #a63a46; border-color: #d85363; }

.sidebar-foot { border-top: 1px solid var(--line-soft); padding-top: 8px; }
.side-link { display: block; width: 100%; padding: 7px 9px; border: 0; color: var(--muted); background: transparent; cursor: pointer; text-align: left; }
.side-link:hover, .side-link.active { color: var(--text); background: #18212a; }
.side-link { border-radius: 4px; text-decoration: none; }
.balance-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.balance-link strong { color: #7dd8ae; font-size: 11px; }
.sidebar-account { display: grid; grid-template-columns: 30px minmax(0, 1fr) 30px; align-items: center; gap: 8px; margin-top: 8px; padding: 10px 7px 2px; border-top: 1px solid var(--line-soft); }
.sidebar-account strong, .sidebar-account span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account strong { font-size: 12px; }
.sidebar-account span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.account-avatar { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #3d6079; border-radius: 50%; color: #dceaf5; background: #1a2b38; font-weight: 700; }

.main-area { display: flex; min-width: 0; min-height: 0; height: 100vh; flex-direction: column; overflow: hidden; background: #111820; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: #121820;
}

.topic { display: flex; min-width: 0; align-items: center; gap: 10px; }
.topic h1 { max-width: 580px; margin: 0; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.topic span { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

.engine-status { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.engine-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.engine-status.ready i { background: var(--green); box-shadow: 0 0 8px rgba(54, 198, 144, .7); }
.engine-status.error i { background: var(--red); }

.quiet-button, .text-button, .icon-button, .attach-button, .stop-button {
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--paper);
  background: transparent;
  cursor: pointer;
}

.quiet-button { padding: 7px 9px; }
.quiet-button:hover, .icon-button:hover, .attach-button:hover { border-color: #52708e; background: #19232d; }
.text-button { padding: 0; border: 0; color: var(--blue-strong); font-size: 12px; }
.icon-button { padding: 6px 8px; font-size: 11px; }
.mobile-menu { display: none; }

.panel-view { display: none; min-height: 0; flex: 1; overflow: auto; }
.panel-view.active { display: flex; flex-direction: column; }
#workspace-panel { overflow: hidden; }

.conversation-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 9px 22px;
  border-bottom: 1px solid var(--line-soft);
  background: #111820;
}

.field-inline { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.field-inline select { width: 132px; padding: 6px; }
.run-option { padding-left: 12px; border-left: 1px solid var(--line-soft); }
.run-option select { width: 112px; color: var(--text); background: #151b22; cursor: pointer; }
#run-reasoning { width: 78px; }

.team-switch { display: inline-flex; align-items: center; gap: 7px; color: var(--paper); cursor: pointer; font-size: 12px; }
.team-switch input { position: absolute; width: 1px; opacity: 0; }
.team-switch span { width: 28px; height: 16px; padding: 1px; border: 1px solid #455461; border-radius: 8px; background: #0b1015; }
.team-switch span::after { display: block; width: 12px; height: 12px; border-radius: 50%; background: #90a0ae; content: ""; transition: transform .15s ease, background .15s ease; }
.team-switch input:checked + span { border-color: #2b75cd; background: #17477a; }
.team-switch input:checked + span::after { transform: translateX(12px); background: #dbeafe; }
.tool-hint { color: var(--muted); font-size: 12px; }

.chat-scroll { position: relative; min-height: 0; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 28px clamp(22px, 4vw, 54px); }
.new-message-notice { position: absolute; z-index: 4; right: clamp(22px, 4vw, 54px); bottom: 18px; padding: 7px 10px; border: 1px solid #3f7ec6; border-radius: 5px; color: #d9ebfa; background: #163049; box-shadow: 0 5px 18px rgba(0, 0, 0, .28); cursor: pointer; font-size: 12px; }
.new-message-notice.hidden { display: none; }
.empty-state { max-width: 650px; margin: 10vh auto; }
.empty-state.hidden { display: none; }
.empty-index { color: var(--blue-strong); font-family: Georgia, serif; font-size: 36px; }
.empty-state h2 { margin: 8px 0; font-size: 25px; font-weight: 640; }
.empty-state p { max-width: 560px; margin: 0; color: var(--muted); line-height: 1.7; }
.empty-usage { display: grid; max-width: 640px; gap: 9px; margin: 20px 0 0; padding: 0; list-style: none; }
.empty-usage li { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: start; gap: 10px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.empty-usage b { display: grid; width: 24px; height: 24px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--paper); font-size: 11px; }
.starter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 24px; }
.starter-grid button { min-height: 62px; border: 1px solid var(--line); border-radius: 6px; color: var(--paper); background: #151e27; cursor: pointer; text-align: left; }
.starter-grid button:hover { border-color: #41668d; background: #172535; }

.message { display: flex; gap: 13px; max-width: 880px; margin: 0 auto 24px; }
.message-mark { flex: 0 0 auto; display: grid; width: 25px; height: 25px; place-items: center; border-radius: 5px; color: #dce9ff; background: #1d334c; font-size: 10px; font-weight: 800; }
.message.user .message-mark { color: #e6f7ff; background: #1a5e7c; }
.message-body { min-width: 0; flex: 1; }
.message-meta { margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.message-content { color: #dbe5ed; line-height: 1.78; white-space: pre-wrap; word-break: break-word; }
.message.user .message-content { color: #f1f7fb; }
.message.pending .message-content { color: var(--muted); }
.message.error .message-content { color: #ffb1b1; }
.message-attachments { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.message-attachment { max-width: 100%; overflow: hidden; padding: 4px 7px; border: 1px solid #31516e; border-radius: 4px; color: #bcd7ec; background: #142536; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.agent-status-panel { margin-top: 13px; border: 1px solid #2c465f; border-radius: 6px; overflow: hidden; background: #101921; }
.agent-status-heading { padding: 8px 10px; border-bottom: 1px solid #263b4f; color: #bcdaf4; font-size: 11px; font-weight: 700; }
.agent-status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: #263b4f; }
.agent-status-card { min-width: 0; padding: 9px 10px; background: #111c25; }
.agent-status-card > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.agent-status-card strong { min-width: 0; overflow: hidden; color: #dce7ef; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.agent-status-card span { flex: 0 0 auto; color: #9db4c7; font-size: 10px; }
.agent-status-card small { display: block; margin-top: 5px; overflow: hidden; color: #7f98ab; font-size: 11px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.agent-status-card.working { border-left: 2px solid #58a5f5; }
.agent-status-card.review { border-left: 2px solid #efb45b; }
.agent-status-card.completed { border-left: 2px solid #36c690; }
.agent-status-card.failed { border-left: 2px solid #f17474; }
.composer-wrap { flex: 0 0 auto; padding: 0 22px 14px; border-top: 1px solid var(--line); background: #121820; }
.attachment-list { display: flex; flex-wrap: wrap; gap: 6px; max-width: 880px; margin: 10px auto 7px; }
.attachment-chip { display: inline-flex; max-width: 100%; align-items: center; gap: 6px; padding: 4px 6px 4px 8px; border: 1px solid #31516e; border-radius: 5px; color: #bdcfdd; background: #142536; font-size: 12px; }
.attachment-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-chip button { border: 0; color: #97b9d2; background: transparent; cursor: pointer; }

.composer { position: relative; max-width: 880px; margin: 0 auto; overflow: hidden; border: 1px solid #394958; border-radius: 7px; background: #0d1218; }
.composer:focus-within { border-color: #3f7ec6; }
.composer textarea { display: block; min-height: 70px; max-height: 210px; padding: 14px; resize: none; border: 0; background: transparent; box-shadow: none; line-height: 1.6; }
.composer-actions { display: flex; align-items: center; gap: 8px; padding: 8px; border-top: 1px solid #27333e; }
.attach-button { padding: 6px 8px; font-size: 12px; }
.upload-note { min-width: 0; flex: 1; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.send-button { min-width: 63px; padding: 7px 11px; }
.stop-button { padding: 7px 10px; color: #ffb1b1; border-color: #7f3e3e; }
.composer-status { min-width: 0; flex: 1; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.composer-caption { max-width: 880px; margin: 8px auto 0; color: #718292; font-size: 11px; text-align: center; }
.reference-verification-option { display: flex; max-width: 880px; min-height: 26px; align-items: center; gap: 10px; margin: 8px auto 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.reference-verification-toggle { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; color: var(--text); cursor: pointer; }
.reference-verification-toggle input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.reference-verification-track { position: relative; width: 30px; height: 17px; flex: 0 0 30px; border: 1px solid #58656f; border-radius: 999px; background: #26313a; transition: border-color .18s ease, background .18s ease; }
.reference-verification-track::after { position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #aeb8bd; content: ""; transition: transform .18s ease, background .18s ease; }
.reference-verification-toggle input:checked + .reference-verification-track { border-color: #2d8b73; background: #2d8b73; }
.reference-verification-toggle input:checked + .reference-verification-track::after { background: #fff; transform: translateX(13px); }
.reference-verification-toggle input:focus-visible + .reference-verification-track { outline: 2px solid #69ad9b; outline-offset: 2px; }

.context-bar { display: flex; min-width: 0; min-height: 0; height: 100vh; flex-direction: column; overflow: hidden; border-left: 1px solid var(--line); }
.context-bar section { padding: 17px 14px; border-bottom: 1px solid var(--line-soft); }
.context-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; color: #aebdca; font-size: 12px; font-weight: 650; }
.team-summary { display: grid; gap: 6px; }
.team-person { display: flex; align-items: center; gap: 8px; padding: 7px; border-left: 2px solid #335d86; background: #151e26; color: #cbd8e3; font-size: 12px; }
.team-person i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.files-list { display: grid; gap: 5px; }
.file-item { display: grid; width: 100%; min-width: 0; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 7px; overflow: hidden; padding: 7px; border: 1px solid var(--line-soft); background: #151e26; }
.file-item span { min-width: 0; overflow: hidden; color: #cad8e4; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.file-item small { flex: 0 0 auto; color: var(--muted); font-size: 10px; white-space: nowrap; }
.file-item .text-button { flex: 0 0 auto; white-space: nowrap; }
.file-item a { color: var(--blue-strong); font-size: 11px; text-decoration: none; }
.activity-section { min-width: 0; min-height: 0; flex: 1; overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; }
.activity-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 12px; line-height: 1.45; }
.activity-list li { padding-left: 12px; border-left: 2px solid #324353; }
.activity-list li.latest { border-left-color: var(--blue-strong); color: #cad8e4; }
.dialogue-guide { min-height: 0; flex: 1; overflow-y: auto; }
.dialogue-guide-steps { display: grid; gap: 15px; margin: 0; padding: 0; list-style: none; }
.dialogue-guide-steps li { display: grid; grid-template-columns: 27px minmax(0, 1fr); gap: 9px; align-items: start; }
.dialogue-guide-steps b { display: grid; width: 27px; height: 27px; place-items: center; border-radius: 50%; color: #b9d7f6; background: #1b334d; font-size: 10px; }
.dialogue-guide-steps strong, .dialogue-guide-steps span { display: block; }
.dialogue-guide-steps strong { margin-bottom: 3px; color: #d2e0ea; font-size: 12px; }
.dialogue-guide-steps span, .dialogue-guide-note { color: var(--muted); font-size: 11px; line-height: 1.55; }
.dialogue-guide-note { margin: 16px 0 0; padding: 10px; border-left: 2px solid var(--blue-strong); background: #151f29; }
.muted { color: var(--muted); font-size: 12px; }

.page-heading { display: flex; align-items: end; justify-content: space-between; padding: 34px clamp(22px, 4vw, 54px) 12px; }
.page-heading h2 { margin: 4px 0 0; font-size: 22px; }
.page-copy { max-width: 760px; padding: 0 clamp(22px, 4vw, 54px) 25px; color: var(--muted); line-height: 1.7; }
.resource-grid, .agent-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 10px; padding: 0 clamp(22px, 4vw, 54px) 36px; }
.resource-card, .agent-card { display: flex; min-height: 154px; flex-direction: column; padding: 15px; border: 1px solid var(--line); border-radius: 6px; background: #151e27; }
.resource-card header, .agent-card header { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.resource-card h3, .agent-card h3 { margin: 0; font-size: 14px; }
.resource-card p, .agent-card p { margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.resource-card footer, .agent-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 13px; color: #7890a4; font-size: 11px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; color: var(--paper); cursor: pointer; font-size: 12px; }
.toggle input { width: 14px; height: 14px; accent-color: var(--blue); }
.count-badge { padding: 4px 7px; border: 1px solid #31597b; border-radius: 4px; color: #a9cae8; background: #132536; font-size: 11px; }

.settings-layout { max-width: 760px; margin: 0 clamp(22px, 4vw, 54px); border-top: 1px solid var(--line); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.setting-row strong { color: var(--paper); font-size: 13px; }

.wallet-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 clamp(22px, 4vw, 54px) 26px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.wallet-summary > div { min-width: 0; padding: 18px 16px; border-right: 1px solid var(--line); }
.wallet-summary > div:last-child { border-right: 0; }
.wallet-summary span, .wallet-summary strong { display: block; }
.wallet-summary span { color: var(--muted); font-size: 11px; }
.wallet-summary strong { margin-top: 8px; overflow: hidden; color: #dce8ef; font-size: 20px; text-overflow: ellipsis; }
.billing-layout { display: grid; grid-template-columns: minmax(320px, 720px); gap: 24px; padding: 0 clamp(22px, 4vw, 54px) 42px; }
.billing-section { min-width: 0; border-top: 2px solid #31556c; }
.billing-section h3 { margin: 0; padding: 13px 0; font-size: 14px; }
.billing-mode-notice { margin: 0 clamp(22px, 4vw, 54px) 18px; padding: 11px 13px; border-left: 3px solid #4d8fe0; color: #a9bdc9; background: #14212b; font-size: 11px; line-height: 1.6; }
.payment-heading { display: flex; min-height: 52px; align-items: flex-start; justify-content: space-between; gap: 12px; }
.payment-heading h3 { padding: 0; }
.payment-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.payment-heading > span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.payment-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 13px 0; }
.payment-option { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--panel-2); cursor: pointer; text-align: left; }
.payment-option:hover { border-color: #4a9b83; }
.payment-option span, .payment-option strong { min-width: 0; overflow-wrap: anywhere; }
.payment-option span { color: var(--muted); font-size: 11px; }
.payment-option strong { font-size: 13px; }
.payment-option:disabled { cursor: wait; opacity: .58; }
.payment-sync { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--line-soft); }
.payment-sync > div:last-child { text-align: right; }
.payment-sync span, .payment-sync strong { display: block; }
.payment-sync span { color: var(--muted); font-size: 10px; }
.payment-sync strong { margin-top: 3px; font-size: 14px; }
.payment-qr-link { display: inline-block; margin: 2px 0 8px; color: var(--blue-strong); font-size: 11px; }
.payment-status { min-height: 18px; margin: 2px 0 8px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.data-list { display: grid; max-height: 420px; gap: 1px; overflow-y: auto; border-top: 1px solid var(--line-soft); }
.data-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 54px; padding: 9px 4px; border-bottom: 1px solid var(--line-soft); }
.data-row strong, .data-row span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-row strong { font-size: 12px; }
.data-row span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.data-row b { color: #bdcbd6; font-size: 12px; white-space: nowrap; }
.data-row .compact { grid-column: 1 / -1; width: max-content; padding: 5px 9px; }

.modal-backdrop { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 18px; background: #0d1117; }
.modal-backdrop.hidden, .hidden { display: none !important; }
.auth-panel, .dialog-card { width: min(100%, 405px); border: 1px solid #324455; border-radius: 7px; background: #121a22; box-shadow: 0 20px 70px rgba(0, 0, 0, .42); }
.auth-panel { padding: 28px; }
.auth-card { width: min(100%, 470px); max-height: calc(100vh - 36px); overflow-y: auto; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 18px 0; border-bottom: 1px solid var(--line); }
.auth-tabs button { padding: 10px; border: 0; border-bottom: 2px solid transparent; color: var(--muted); background: transparent; cursor: pointer; }
.auth-tabs button.active { border-bottom-color: var(--blue); color: var(--text); }
.auth-form { gap: 11px; }
.registration-consent { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 9px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--panel-2); font-size: 12px; line-height: 1.65; }
.registration-consent > input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--blue); }
.registration-consent > div { min-width: 0; }
.registration-consent label { display: inline; color: var(--text); cursor: pointer; }
.registration-consent button { display: inline; padding: 0; border: 0; color: var(--blue-strong); background: transparent; cursor: pointer; font: inherit; font-weight: 700; }
.registration-consent button:hover { text-decoration: underline; text-underline-offset: 3px; }
.registration-consent small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.captcha-row { display: grid; grid-template-columns: minmax(0, 1fr) 180px; align-items: end; gap: 10px; }
.captcha-row button { width: 180px; height: 38px; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: #0d1218; cursor: pointer; }
.captcha-row img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* 注册邮箱验证码：输入框 + 发送按钮，底部对齐 */
.email-code-row { display: grid; grid-template-columns: minmax(0, 1fr) 132px; align-items: end; gap: 10px; }
.email-code-row input { letter-spacing: 3px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.email-code-send { height: 38px; white-space: nowrap; }
.email-code-send:disabled { cursor: not-allowed; opacity: .6; }
.forgot-password { justify-self: center; margin-top: -2px; font-size: 12px; }
.support-dialog { max-width: 420px; }
.support-copy { padding: 0 0 12px; }
.support-contact {
  margin: 0 0 18px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel-3); font-size: 14px; line-height: 1.6;
  overflow-wrap: anywhere;
}
.auth-panel h2, .dialog-card h2 { margin: 7px 0 8px; font-size: 20px; }
.auth-panel p { margin: 0 0 20px; color: var(--muted); line-height: 1.6; }
form { display: grid; gap: 13px; }
form label { display: grid; gap: 6px; color: #b8c6d2; font-size: 12px; }
form input, form textarea, form select { padding: 9px; }
form textarea { resize: vertical; }
.form-status { min-height: 18px; color: var(--amber); font-size: 12px; }
.auth-panel small { display: block; color: #718292; font-size: 11px; line-height: 1.5; }
.dialog-card { width: min(100%, 520px); padding: 18px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.dialog-head h2 { margin: 0; }
.dialog-actions { display: flex; justify-content: end; gap: 8px; }
.feedback-dialog { width: min(100%, 680px); max-height: calc(100vh - 36px); overflow-y: auto; }
.feedback-template-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.feedback-dialog textarea { width:100%; height:112px !important; min-height:112px; max-height:112px; border-radius:8px; resize:none; }
.feedback-note { margin: -2px 0 0; padding: 10px 12px; border-left: 3px solid var(--amber); color: var(--muted); background: rgba(239, 180, 91, .08); font-size: 11px; line-height: 1.6; }

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 230px minmax(0, 1fr); }
  .context-bar { display: none; }
}

@media (max-width: 720px) {
  .app-shell { display: block; min-height: 0; overflow: visible; }
  .sidebar { position: fixed; z-index: 5; inset: 0 auto 0 0; width: 254px; transform: translateX(-100%); transition: transform .18s ease; box-shadow: 12px 0 30px rgba(0,0,0,.35); }
  .app-shell.nav-open .sidebar { transform: translateX(0); }
  .main-area { height: 100vh; }
  .mobile-menu { display: inline-block; }
  .topbar { padding: 10px 12px; }
  .topbar-actions .quiet-button { display: none; }
  .engine-status span { display: none; }
  .conversation-tools { flex-wrap: wrap; gap: 9px; padding: 9px 12px; }
  .run-option { padding-left: 0; border-left: 0; }
  .chat-scroll { padding: 18px 14px; }
  .empty-state { margin: 5vh auto; }
  .empty-state h2 { font-size: 21px; }
  .starter-grid { grid-template-columns: 1fr; }
  .composer-wrap { padding: 0 12px 10px; }
  .agent-status-grid { grid-template-columns: 1fr; }
  .page-heading { padding: 25px 18px 12px; }
  .page-copy { padding: 0 18px 22px; }
  .resource-grid, .agent-grid { padding: 0 18px 25px; }
  .settings-layout { margin: 0 18px; }
  .wallet-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 18px 22px; }
  .wallet-summary > div:nth-child(2) { border-right: 0; }
  .wallet-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .billing-layout { grid-template-columns: 1fr; padding: 0 18px 28px; }
  .billing-mode-notice, .balance-announcement { margin: 0 18px 18px; }
  .payment-options { grid-template-columns: 1fr; }
  .captcha-row { grid-template-columns: 1fr; }
}

/* Structured writing and non-chat task center */
.structured-shell, .task-center-shell { min-height: 100%; padding: 30px clamp(18px, 4vw, 58px) 70px; overflow: auto; color: #25312c; background: #f6f8f7; }
.structured-heading, .task-center-heading { display: flex; width: min(1280px, 100%); align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 auto 24px; }
.structured-heading h2, .task-center-heading h2 { margin: 5px 0; color: #17231d; font-size: 29px; letter-spacing: 0; }
.structured-heading p, .task-center-heading p { margin: 0; color: #77857e; }
.structured-steps { display: grid; width: min(900px, calc(100% - 30px)); grid-template-columns: repeat(4, 1fr); margin: 0 auto 30px; padding: 0; list-style: none; }
.structured-steps li { position: relative; display: grid; justify-items: center; gap: 8px; color: #97a19c; font-size: 12px; }
.structured-steps li::before { position: absolute; top: 17px; right: 50%; width: 100%; height: 1px; background: #d9e0dc; content: ""; }
.structured-steps li:first-child::before { display: none; }
.structured-steps b { z-index: 1; display: grid; width: 35px; height: 35px; place-items: center; border: 1px solid #d7dfda; border-radius: 50%; color: #8b9690; background: #f6f8f7; }
.structured-steps li.active, .structured-steps li.complete { color: #273a32; font-weight: 650; }
.structured-steps li.active b, .structured-steps li.complete b { border-color: #357963; color: #fff; background: #357963; }
.structured-form { width: min(1280px, 100%); margin: auto; padding: 28px 34px 22px; border: 1px solid #dce4e0; border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(29, 56, 43, .05); }
.structured-stage { display: none; }
.structured-stage.active { display: block; }
.structured-stage-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 24px; padding-bottom: 17px; border-bottom: 1px solid #e8edea; }
.structured-stage-head > span { padding: 4px 7px; border-radius: 4px; color: #2f6d5b; background: #eaf3ef; font-size: 11px; font-weight: 750; }
.structured-stage-head h3 { margin: 0; color: #24332c; font-size: 19px; }
.structured-stage-head p { margin: 5px 0 0; color: #8a9690; font-size: 12px; }
.structured-grid { display: grid; align-items:start; gap: 18px; margin-bottom: 21px; }
.structured-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.structured-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.structured-field { display: grid; min-width: 0; gap: 8px; margin-bottom: 20px; color: #3d4b44; font-size: 13px; font-weight: 650; }
.structured-field b, .deliverable-picker b { color: #cb4e47; }
.structured-field span small { margin-left: 5px; color: #95a09a; font-weight: 400; }
.structured-field input, .structured-field select, .structured-field textarea { width: 100%; min-width: 0; border: 1px solid #d9e2dd; border-radius: 7px; color: #26332d; background: #fff; box-shadow: none; }
.structured-field input, .structured-field select { height: 46px; padding: 0 14px; }
.structured-field textarea { padding: 13px 14px; resize: vertical; line-height: 1.7; }
.structured-field > small { color: #96a19b; font-size: 11px; font-weight: 400; }
.structured-field .char-count { text-align: right; }
.deliverable-picker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 6px 0 24px; padding: 0; border: 0; }
.deliverable-picker legend { grid-column: 1 / -1; margin-bottom: 10px; color: #3d4b44; font-size: 13px; font-weight: 650; }
.deliverable-picker label { display: flex; min-height: 47px; align-items: center; justify-content: center; gap: 7px; border: 1px solid #dce4e0; border-radius: 7px; color: #4a5751; cursor: pointer; }
.deliverable-picker label:has(input:checked), .deliverable-picker label.selected { border-color: #4269f2; color: #3154d3; background: #f5f7ff; }
.deliverable-picker input { width: 15px; height: 15px; accent-color: #4269f2; }
.deliverable-picker small { padding: 2px 5px; border-radius: 3px; color: #3154d3; background: #e7ebff; font-size: 9px; }
.structured-formatting-option { margin: 0 0 24px; padding: 15px 16px; border: 1px solid #dce4e0; border-radius: 8px; background: #f8faf9; }
.structured-formatting-toggle { display: flex; align-items: center; gap: 11px; color: #34433c; cursor: pointer; }
.structured-formatting-toggle input { width: 17px; height: 17px; accent-color: #357963; }
.structured-formatting-toggle span, .structured-formatting-toggle strong { display: block; }
.structured-formatting-option .structured-field { margin: 14px 0 0 28px; }
.segmented-control { display: inline-flex; gap: 2px; margin-bottom: 20px; padding: 3px; border: 1px solid #dce4e0; border-radius: 7px; background: #f4f7f5; }
.segmented-control button { min-height: 34px; padding: 0 15px; border: 0; border-radius: 5px; color: #68756e; background: transparent; cursor: pointer; }
.segmented-control button.active { color: #245d4d; background: #fff; box-shadow: 0 1px 4px rgba(33, 56, 45, .12); }
.structured-upload { display: grid; min-height: 185px; place-items: center; align-content: center; gap: 9px; border: 1px dashed #748c82; border-radius: 8px; color: #607169; background: #edf2f0; cursor: pointer; }
.structured-upload.dragging { border-color: #3f7f6b; background: #e5f0eb; }
.structured-upload .upload-symbol { font-size: 29px; line-height: 1; }
.structured-upload strong { font-weight: 500; }
.structured-upload u { color: #315bd8; text-underline-offset: 2px; }
.structured-upload small { color: #829088; }
.structured-upload-list { display: grid; gap: 7px; margin-top: 10px; }
.structured-upload-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border: 1px solid #e0e7e3; border-radius: 6px; color: #526159; font-size: 12px; }
.structured-upload-item button { border: 0; color: #a24743; background: transparent; cursor: pointer; }
.outline-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.structured-review { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 24px; border-top: 1px solid #e4eae7; border-left: 1px solid #e4eae7; }
.structured-review div { padding: 14px; border-right: 1px solid #e4eae7; border-bottom: 1px solid #e4eae7; }
.structured-review span, .structured-review strong { display: block; }
.structured-review span { color: #8a9690; font-size: 11px; }
.structured-review strong { margin-top: 5px; color: #2e3b35; overflow-wrap: anywhere; }
.payment-confirm { display: flex; align-items: flex-start; gap: 10px; padding: 15px; border: 1px solid #ead8c7; border-radius: 7px; color: #66594c; background: #fffaf4; font-size: 13px; line-height: 1.6; }
.payment-confirm input { width: 16px; height: 16px; margin-top: 2px; accent-color: #3a765f; }
.payment-confirm strong { color: #be463d; }
.structured-actions { display: flex; min-height: 54px; align-items: center; justify-content: flex-end; gap: 12px; margin: 24px -34px -22px; padding: 16px 34px; border-top: 1px solid #e7ece9; }
.structured-actions .form-status { flex: 1; color: #a14843; }
.structured-actions .form-status.success { color: #287158; }
.structured-actions .form-status:empty { display: none; }
.structured-actions #structured-prev { display: inline-flex; width: 104px; min-width: 104px; height: 44px; flex: 0 0 104px; align-items: center; justify-content: center; padding: 0 15px; border-radius: 7px; }
.structured-actions #structured-next, .structured-actions #structured-submit { width: auto; min-width: 138px; height: 44px; flex: 1 1 auto; border-radius: 7px; }
.task-center-shell { width: 100%; }
.task-center-filters { display: flex; width: min(1280px, 100%); align-items: flex-end; gap: 10px; margin: 0 auto 18px; padding: 14px 16px; border: 1px solid #dce4e0; border-radius: 8px; background: #fff; box-shadow: 0 4px 12px rgba(31, 68, 50, .035); }
.task-center-filters label { position: relative; display: block; }
.task-center-filters label > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.task-center-filters select, .task-center-filters input { height: 42px; min-width: 0; padding: 0 13px; border: 1px solid #d8e1dc; border-radius: 7px; color: #34443c; background: #fff; box-shadow: none; font: inherit; font-size: 13px; outline: 0; }
.task-center-filters select { width: 170px; }
.task-center-filters .task-id-filter { width: 250px; }
.task-center-filters input { width: 100%; }
.task-center-filters select:focus, .task-center-filters input:focus { border-color: #3b8a65; box-shadow: 0 0 0 3px rgba(31, 133, 89, .09); }
.task-query-button { min-width: 82px; height: 42px; border: 0; border-radius: 7px; color: #fff; background: #1f8559; cursor: pointer; font-weight: 680; }
.task-query-button:hover { background: #176b47; }
.task-center-table { width: min(1280px, 100%); overflow: hidden; margin: auto; border: 1px solid #dce4e0; border-radius: 8px; background: #fff; box-shadow: 0 8px 24px rgba(27, 58, 43, .055); }
.task-table-head, .task-center-item { display: grid; grid-template-columns: minmax(260px, 2fr) 110px 88px 190px 92px 155px 150px; align-items: center; column-gap: 14px; }
.task-table-head { min-height: 49px; padding: 0 16px; border-bottom: 1px solid #dfe6e2; color: #85928b; background: #f1f5f3; font-size: 11px; font-weight: 650; }
.task-center-list { display: grid; }
.task-center-list > .muted { padding: 36px; text-align: center; }
.task-center-item { min-width: 0; padding: 14px 16px; border-bottom: 1px solid #e7ece9; background: #fff; }
.task-center-item:last-child { border-bottom: 0; }
.task-center-item:hover { background: #fbfdfc; }
.task-main-cell { min-width: 0; }
.task-main-cell strong, .task-main-cell span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-main-cell strong { color: #24342c; font-size: 13px; }
.task-main-cell span { margin-top: 5px; color: #86938c; font-size: 10px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.task-kind { display: inline-block; max-width: 100%; overflow: hidden; padding: 4px 7px; border-radius: 4px; color: #376b56; background: #e9f3ed; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.task-options { display: block; margin-top: 5px; color: #68766f; font-size: 10px; line-height: 1.4; }
.task-status { display: inline-block; padding: 4px 8px; border-radius: 12px; color: #5e6e66; background: #edf1ef; font-size: 10px; font-weight: 680; white-space: nowrap; }
.status-succeeded .task-status { color: #167047; background: #dff2e8; }
.status-running .task-status, .status-cancelling .task-status { color: #8a6120; background: #fbefd5; }
.status-failed .task-status { color: #a4403c; background: #f9e5e3; }
.status-cancelled .task-status { color: #6f7c75; background: #e9eeeb; }
.task-progress { min-width: 0; }
.task-progress > div { height: 3px; overflow: hidden; border-radius: 3px; background: #e4ebe7; }
.task-progress > div span { display: block; height: 100%; border-radius: inherit; background: #2e9668; }
.task-progress.is-indeterminate > div span { animation: task-progress-slide 1.35s ease-in-out infinite; }
@keyframes task-progress-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(245%); } }
.status-failed .task-progress > div span { background: #c65a53; }
.status-cancelled .task-progress > div span { background: #8fa198; }
.task-progress small { display: flex; justify-content: space-between; gap: 10px; margin-top: 6px; color: #929e98; font-size: 9px; }
.task-progress b { color: #277c59; font-size: 10px; }
.status-failed .task-progress b { color: #b24a45; }
.task-fee { color: #37463e; font-size: 12px; font-weight: 650; }
.task-center-item time { color: #7f8d85; font-size: 11px; white-space: nowrap; }
.task-center-actions { display: flex; min-width: 0; align-items: center; justify-content: flex-start; gap: 6px; flex-wrap: nowrap; }
.task-center-actions a, .task-center-actions button { display: inline-flex; min-width: 58px; min-height: 32px; align-items: center; justify-content: center; padding: 0 9px; border: 1px solid #d4dfd9; border-radius: 6px; color: #286b50; background: #fff; cursor: pointer; font-size: 11px; text-decoration: none; white-space: nowrap; }
.task-center-actions a:hover, .task-center-actions button:hover { border-color: #79ad94; background: #edf6f1; }
.task-center-actions .task-cancel { min-width: 42px; color: #a14d47; }
.task-row-detail { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 28px; margin: 14px -16px -14px; padding: 15px 16px 17px; border-top: 1px solid #e4eae7; background: #f8faf9; }
.task-row-detail > div { min-width: 0; }
.task-row-detail span, .task-row-detail strong { display: block; }
.task-row-detail span { margin-bottom: 5px; color: #87938d; font-size: 9px; }
.task-row-detail strong { overflow-wrap: anywhere; color: #45544c; font-size: 11px; font-weight: 500; }
.task-row-detail .task-error strong { color: #b04440; }
.task-row-detail .task-warning strong { color: #9b6a18; }
.task-detail-files { display: flex; grid-column: 1 / -1; align-items: center; gap: 7px; flex-wrap: wrap; }
.task-detail-files > span { width: 100%; }
.task-detail-files a { padding: 5px 8px; border: 1px solid #d3dfd9; border-radius: 5px; color: #286b50; background: #fff; font-size: 10px; text-decoration: none; }
.task-empty { padding: 48px 20px; text-align: center; }
.task-empty strong { color: #526159; font-size: 13px; }
.task-empty p { margin: 7px 0 0; color: #96a19b; font-size: 11px; }
@media (max-width: 900px) { .structured-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }.deliverable-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .structured-shell, .task-center-shell { padding: 20px 12px 50px; }.structured-heading, .task-center-heading { align-items: flex-start; }.structured-heading h2, .task-center-heading h2 { font-size: 23px; }.structured-form { padding: 20px 14px; }.structured-grid.two, .structured-grid.four { grid-template-columns: 1fr; }.structured-steps { width: 100%; }.structured-steps span { font-size: 10px; }.structured-actions { margin: 20px -14px -20px; padding: 14px; flex-wrap: wrap; }.structured-actions .form-status { flex-basis: 100%; }.structured-review { grid-template-columns: 1fr; }.task-center-tabs { overflow-x: auto; }.task-center-tabs button { white-space: nowrap; }.task-center-item { grid-template-columns: 1fr; }.task-center-actions { justify-content: flex-start; } }

/* 2026 modular white interface */
:root {
  --bg: #f7f9f8;
  --panel: #ffffff;
  --panel-2: #f4f7f5;
  --panel-3: #edf2ef;
  --line: #dde5e1;
  --line-soft: #e9eeeb;
  --text: #18211d;
  --muted: #748079;
  --blue: #2f8f78;
  --blue-strong: #20735f;
  --green: #33a284;
  --amber: #d29a3a;
  --red: #db6b61;
  --paper: #3e4a44;
}

* { scrollbar-color: #c8d5cf transparent; }
*::-webkit-scrollbar-thumb { background: #c8d5cf; }
body { color: var(--text); background: #f7f9f8; }

.app-shell {
  display: grid;
  height: 100vh;
  grid-template-columns: 250px minmax(0, 1fr) 276px;
  grid-template-rows: 78px auto minmax(0, 1fr);
  overflow: hidden;
  background: #ffffff;
}

.global-header {
  z-index: 20;
  display: flex;
  min-width: 0;
  grid-column: 1 / -1;
  grid-row: 1;
  align-items: center;
  gap: 34px;
  padding: 12px 22px;
  border-bottom: 1px solid #e6ebe8;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 5px 24px rgba(32, 51, 43, .04);
  transition:background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.global-header.is-scrolled { border-bottom-color:rgba(154,181,168,.48); background:rgba(255,255,255,.45); box-shadow:0 10px 32px rgba(28,48,39,.12),inset 0 1px rgba(255,255,255,.8); -webkit-backdrop-filter:blur(22px) saturate(165%); backdrop-filter:blur(22px) saturate(165%); }
html[data-theme="dark"] .global-header.is-scrolled { border-bottom-color:rgba(72,86,79,.55); background:rgba(15,20,18,.7); box-shadow:0 10px 32px rgba(0,0,0,.28); }

.global-site-banner {
  z-index: 9;
  min-width: 0;
  grid-column: 1 / -1;
  grid-row: 2;
  padding: 10px 24px;
  background: transparent;
}
.global-site-banner-inner {
  display: flex;
  width: min(936px, 100%);
  max-height: 96px;
  min-height: 46px;
  align-items: center;
  gap: 12px;
  margin: 0 auto;
  padding: 10px 14px;
  overflow: auto;
  border: 1px solid #dde5e1;
  border-radius: 8px;
  color: #748079;
  background: #ffffff;
}
.global-site-banner-mark { display: grid; width: 19px; height: 19px; flex: 0 0 19px; place-items: center; color: #2f8f78; }
.global-site-banner-mark img { display: block; width: 100%; height: 100%; }
.global-site-banner strong { min-width: 0; color: #506159; font-size: 12px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.balance-announcement { margin: 0 clamp(22px, 4vw, 54px) 18px; }
.balance-announcement .global-site-banner-inner { width: 100%; max-height: none; margin: 0; }
.balance-announcement strong { min-width: 0; color: #506159; font-size: 12px; line-height: 1.65; overflow-wrap: anywhere; }
html[data-theme="dark"] .balance-announcement strong { color: #cbd5d0; }

.global-brand {
  display: flex;
  flex: 0 0 232px;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  color: #17201c;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.global-brand strong, .global-brand small { display: block; }
.global-brand strong { font-size: 17px; font-weight: 750; white-space: nowrap; }
.global-brand small { margin-top: 2px; color: #87918c; font-size: 10px; }

.module-nav { display: grid; min-width: 0; flex: 1; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(14px, 2vw, 34px); }
.module-nav-primary, .module-nav-account { display: flex; min-width: 0; align-items: center; gap: 6px; }
.module-nav-primary { justify-content: center; }
.module-nav-account { justify-content: flex-end; }
.logout-tab { color: #a33d3d; }
.profile-name-form { padding: 16px 0; border-bottom: 1px solid #e0e7e3; }
.password-form { display: grid; gap: 10px; padding: 20px 0; border-bottom: 1px solid #e0e7e3; }
.password-form h3 { margin: 0 0 2px; font-size: 14px; }
.password-form .primary-button { justify-self: start; }

@media (min-width: 721px) {
  #balance-panel .page-heading,
  #balance-panel .billing-mode-notice,
  #balance-panel .balance-announcement,
  #balance-panel .wallet-summary,
  #balance-panel .billing-layout {
    width: min(1180px, calc(100% - 48px));
    margin-left: auto;
    margin-right: auto;
  }
  #settings-panel .page-heading,
  #settings-panel .settings-layout {
    width: min(760px, calc(100% - 48px));
    margin-left: auto;
    margin-right: auto;
  }
  #balance-panel .page-heading,
  #settings-panel .page-heading { padding-left: 0; padding-right: 0; }
  #balance-panel .billing-mode-notice { margin-bottom: 18px; }
  #balance-panel .balance-announcement { margin-bottom: 18px; }
  #balance-panel .wallet-summary { margin-bottom: 26px; }
  #balance-panel .billing-layout { padding-left: 0; padding-right: 0; }
}

@media (max-width: 1600px) and (min-width: 721px) {
  .global-header { gap:12px; padding:10px 14px; }
  .global-brand { flex-basis:150px; }
  .global-brand small { display:none; }
  .module-nav { gap:8px; }
  .module-nav-primary, .module-nav-account { gap:2px; }
  .module-tab { padding:0 8px; font-size:12px; }
  .balance-tab { gap:4px; }
}

@media (max-width: 1200px) and (min-width: 721px) {
  .global-brand { flex-basis:42px; }
  .global-brand > span { display:none; }
  .module-nav-primary {
    justify-content:flex-start;
    overflow-x:auto;
    scrollbar-width:none;
  }
  .module-nav-primary::-webkit-scrollbar { display:none; }
}

/* Survey workspace */
.survey-shell { min-height: 100%; padding: 30px clamp(18px, 3vw, 46px) 60px; color: #27342d; background: #f6f8f7; }
.survey-heading { display: flex; width: min(1380px, 100%); align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 auto 22px; }
.survey-heading h2 { margin: 5px 0; color: #17231d; font-size: 30px; letter-spacing: 0; }.survey-heading p { margin: 0; color: #7b8780; }
.survey-layout { display: grid; width: min(1380px, 100%); grid-template-columns: minmax(0, 1fr) 270px; gap: 24px; margin: auto; align-items: start; }
.survey-main { display: grid; gap: 18px; }.survey-card, .survey-submit-bar, .survey-aside section { border: 1px solid #dce5e0; border-radius: 8px; background: #fff; box-shadow: 0 6px 18px rgba(30, 66, 49, .045); }
.survey-card { padding: 20px; }.survey-card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -20px -20px 18px; padding: 15px 20px; border-bottom: 1px solid #e5ebe8; background: #fbfcfb; border-radius: 8px 8px 0 0; }
.survey-card-head h3 { margin: 0; color: #243129; font-size: 16px; }.survey-card-head > span { color: #839089; font-size: 12px; }
.survey-config-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }.survey-config-guide { margin: 0 0 14px; padding: 12px 14px; border: 1px solid #e1e8e4; border-radius: 6px; background: #f8faf9; }.survey-config-guide summary { color: #315f51; cursor: pointer; font-size: 13px; font-weight: 700; }.survey-config-guide p { margin: 9px 0; color: #68766e; font-size: 12px; line-height: 1.65; }.survey-config-guide pre { max-height: 260px; margin: 0; padding: 12px; overflow: auto; border-radius: 5px; color: #33483e; background: #edf3f0; font: 12px/1.55 Consolas, monospace; white-space: pre-wrap; }
.survey-field { display: grid; gap: 8px; min-width: 0; }.survey-field > span, .survey-card legend { color: #3f4e46; font-size: 13px; font-weight: 650; }.survey-field b { color: #c54e4e; }.survey-field input, .survey-field select, .survey-card fieldset input { width: 100%; min-width: 0; height: 44px; padding: 0 14px; border: 1px solid #d9e3de; border-radius: 6px; }
.survey-field input[type="range"] { height: 28px; padding: 0; accent-color: #3d806e; box-shadow: none; }.survey-field output { float: right; color: #2b7b65; }
.survey-status { min-height: 18px; margin: 10px 0 0; color: #87928c; font-size: 12px; }.survey-status.working { color: #7a642c; }.survey-status.success { color: #287158; }.survey-status.error { color: #b54242; }
.survey-parameter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }.survey-parameter-grid fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }.survey-parameter-grid legend { margin-bottom: 8px; }.survey-region { grid-column: 1 / -1; }.survey-region-options { display: flex; flex-wrap: wrap; gap: 8px; }.survey-region-option { min-width: 66px; height: 40px; padding: 0 13px; border: 1px solid #dce4e9; border-radius: 8px; color: #35424d; background: #fff; cursor: pointer; font-size: 14px; }.survey-region-option.selected { border-color: #4567ff; color: #2647dc; background: #f4f6ff; }.survey-region-option:hover { border-color: #8fa2ff; }
.range-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; }.range-pair span { color: #7e8a83; }
.survey-question-list { display: grid; gap: 12px; }.survey-question { padding: 16px; border: 1px solid #e0e7e3; border-radius: 6px; background: #fcfdfc; }.survey-question header { display: flex; align-items: flex-start; gap: 12px; }.survey-question header > span { display: grid; min-width: 34px; height: 28px; place-items: center; border-radius: 4px; color: #276b58; background: #e9f4ef; font-size: 11px; font-weight: 750; }.survey-question header strong, .survey-question header small { display: block; }.survey-question header strong { color: #27352d; line-height: 1.5; }.survey-question header small { margin-top: 3px; color: #859088; font-size: 11px; }
.survey-option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 14px; margin-top: 14px; }.survey-option-grid label { display: grid; grid-template-columns: minmax(0, 1fr) 72px 14px; align-items: center; gap: 7px; }.survey-option-grid label > span { overflow: hidden; color: #5a675f; text-overflow: ellipsis; white-space: nowrap; }.survey-option-grid input { width: 72px; height: 34px; border-radius: 5px; }.survey-option-grid b { color: #839088; font-weight: 500; }
.survey-candidates { display: grid; gap: 7px; margin-top: 14px; color: #5d6a62; }.survey-candidates textarea { width: 100%; padding: 10px; border-radius: 5px; resize: vertical; }.survey-number-range { max-width: 430px; margin-top: 14px; }.survey-number-range input { width: 100%; height: 36px; border-radius: 5px; }
.survey-dimension { display: flex; align-items: flex-end; gap: 18px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e8edea; }.survey-dimension label:first-child { display: grid; flex: 1; gap: 6px; color: #647169; }.survey-dimension input[type="text"] { height: 36px; border-radius: 5px; }.survey-check { display: flex; align-items: center; gap: 7px; padding-bottom: 8px; white-space: nowrap; }.survey-check input { accent-color: #367b67; }
.survey-submit-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; }.survey-submit-bar strong, .survey-submit-bar span { display: block; }.survey-submit-bar strong { color: #26352d; }.survey-submit-bar span { margin-top: 4px; color: #829087; font-size: 12px; }.survey-submit-bar .send-button { min-width: 116px; min-height: 42px; border-radius: 6px; }.survey-submit-bar .send-button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.survey-aside { position: sticky; top: 20px; display: grid; gap: 14px; }.survey-aside section { padding: 18px; }.survey-aside h3 { margin: 0 0 13px; color: #29372f; font-size: 15px; }.survey-aside p { margin: 0; color: #7d8982; font-size: 12px; line-height: 1.75; }.survey-aside dl { margin: 0; }.survey-aside dl div { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid #e7ece9; }.survey-aside dl div:last-child { border: 0; }.survey-aside dt { color: #7c8881; }.survey-aside dd { margin: 0; color: #2b705d; font-weight: 650; }
.survey-task-list { display: grid; gap: 11px; }.survey-task { padding: 14px 16px; border: 1px solid #e0e7e3; border-left: 4px solid #7a9f93; border-radius: 6px; }.survey-task.status-succeeded { border-left-color: #32936d; }.survey-task.status-failed { border-left-color: #c45454; }.survey-task header { display: flex; justify-content: space-between; gap: 14px; }.survey-task header strong, .survey-task header span { display: block; }.survey-task header span { margin-top: 4px; color: #87928c; font-size: 11px; }.survey-task header b { color: #497466; font-size: 12px; }.survey-task-progress { height: 5px; margin-top: 13px; overflow: hidden; border-radius: 4px; background: #e9eeeb; }.survey-task-progress i { display: block; height: 100%; background: #3e9076; }.survey-task p { margin: 8px 0; color: #718078; font-size: 12px; overflow-wrap: anywhere; }.survey-task footer { display: flex; flex-wrap: wrap; gap: 8px; }.survey-task footer a { padding: 6px 9px; border-radius: 4px; color: #256d59; background: #eaf5f0; font-size: 11px; text-decoration: none; }.survey-task footer .quiet-button { min-height: 30px; padding: 0 11px; border-radius: 4px; font-size: 11px; }
html[data-theme="dark"] .survey-shell { color: #dce5e0; background: #111513; } html[data-theme="dark"] .survey-heading h2, html[data-theme="dark"] .survey-card-head h3, html[data-theme="dark"] .survey-aside h3, html[data-theme="dark"] .survey-question header strong, html[data-theme="dark"] .survey-submit-bar strong { color: #e4ebe7; } html[data-theme="dark"] .survey-card, html[data-theme="dark"] .survey-submit-bar, html[data-theme="dark"] .survey-aside section, html[data-theme="dark"] .survey-question, html[data-theme="dark"] .survey-task { border-color: #344039; background: #171c1a; } html[data-theme="dark"] .survey-card-head { border-color: #303a35; background: #1b211e; } html[data-theme="dark"] .survey-config-guide { border-color: #344039; background: #1b211e; } html[data-theme="dark"] .survey-config-guide summary { color: #a9d5c5; } html[data-theme="dark"] .survey-config-guide p { color: #a8b4ad; } html[data-theme="dark"] .survey-config-guide pre { color: #d8e4dd; background: #111714; } html[data-theme="dark"] .survey-dimension { border-color: #303a35; } html[data-theme="dark"] .survey-region-option { border-color: #3b4841; color: #d7e0da; background: #1b211e; } html[data-theme="dark"] .survey-region-option.selected { border-color: #6b83ff; color: #c5ceff; background: #202744; }
@media (max-width: 900px) { .survey-layout { grid-template-columns: 1fr; }.survey-aside { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }.survey-option-grid { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .survey-shell { padding: 20px 12px 40px; }.survey-heading, .survey-submit-bar { align-items: stretch; flex-direction: column; }.survey-parameter-grid, .survey-aside { grid-template-columns: 1fr; }.survey-card { padding: 15px; }.survey-card-head { margin: -15px -15px 15px; padding: 13px 15px; }.survey-config-actions { width: 100%; justify-content: flex-start; }.survey-dimension { align-items: stretch; flex-direction: column; gap: 8px; }.survey-check { padding: 0; } }
.module-tab {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: #536059;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 620;
  white-space: nowrap;
  transition: color .22s ease, background .22s ease, border-color .22s ease, transform .22s ease, box-shadow .22s ease;
}
.module-tab:hover { color: #1f705d; background: #f1f7f4; transform: translateY(-1px); }
.module-tab.active { border-color: #cae2da; color: #176650; background: #eaf6f1; box-shadow: 0 5px 16px rgba(42, 113, 91, .08); }
.balance-tab { border-color: #eadfc7; background: #fffaf0; }
.balance-tab strong { color: #a87017; font-size: 12px; }

.sidebar { grid-column: 1; grid-row: 3; height: auto; padding: 18px 14px 14px; border-right: 1px solid #e5ebe7; background: #fbfcfb; }
.main-area { grid-column: 2; grid-row: 3; height: auto; background: #ffffff; }
.context-bar { grid-column: 3; grid-row: 3; height: auto; border-left: 1px solid #e5ebe7; background: #fbfcfb; }
.app-shell[data-layout="module"] .sidebar,
.app-shell[data-layout="module"] .context-bar,
.app-shell[data-layout="module"] .topbar { display: none; }
.app-shell[data-layout="module"] .main-area { grid-column: 1 / -1; }

.dialogue-subnav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; margin-bottom: 14px; padding: 5px; border: 1px solid #e2e9e5; border-radius: 999px; background: #f1f5f3; }
.dialogue-subnav .side-link { padding: 8px 7px; border-radius: 999px; color: #768079; text-align: center; transition: all .2s ease; }
.dialogue-subnav .side-link:hover { color: #276e5d; background: #f9fbfa; }
.dialogue-subnav .side-link.active { color: #175f4d; background: #ffffff; box-shadow: 0 4px 12px rgba(37, 69, 57, .09); }

.primary-button, .primary-small, .send-button, .quiet-button, .text-button, .icon-button, .attach-button, .stop-button {
  border-radius: 999px;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.primary-button, .primary-small, .send-button { border-color: #2d8b73; color: #fff; background: #2d8b73; box-shadow: 0 7px 18px rgba(45, 139, 115, .15); }
.primary-button:hover, .primary-small:hover, .send-button:hover { background: #247660; transform: translateY(-1px); box-shadow: 0 9px 22px rgba(45, 139, 115, .22); }
.sidebar > .primary-button { min-height: 43px; }

.search-box { padding: 17px 4px 10px; color: #7c8781; }
.search-box input, input, select, textarea { border-color: #dce5e0; border-radius: 999px; color: #24302a; background: #ffffff; }
select { appearance:none; padding-right:38px !important; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='m3.5 5 3.5 3.5L10.5 5' fill='none' stroke='%236c7d74' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-position:right 13px center; background-repeat:no-repeat; background-size:14px; }
.search-box input { padding: 10px 14px; background: #f4f7f5; }
input:focus, select:focus, textarea:focus { border-color: #67ad9b; box-shadow: 0 0 0 4px rgba(64, 148, 126, .1); }
.section-label { color: #8b958f; }
.conversation-list { gap: 6px; }
.conversation-row { border-radius: 18px; }
.conversation-item { padding: 11px 13px; border: 1px solid transparent; border-radius: 18px; color: #445149; transition: all .2s ease; }
.conversation-item:hover { border-color: #e3eae6; background: #f3f7f5; transform: translateX(2px); }
.conversation-item.active { border-color: #cfe3dc; color: #1d5d4d; background: #eaf5f1; }
.conversation-delete { border-radius: 999px; color: #b5544c; background: #fff2f0; }
.sidebar-foot { border-color: #e7ece9; }
.sidebar-account { border-color: #e7ece9; }
.account-avatar { border-color: #cce1da; color: #236e5b; background: #eaf5f1; }

.topbar { min-height: 66px; padding: 11px 24px; border-color: #e8edea; background: #ffffff; }
.topic h1 { color: #1c2721; }
.topic span { color: #849088; }
.quiet-button, .icon-button, .attach-button { border-color: #dce4e0; color: #526058; background: #ffffff; }
.quiet-button:hover, .icon-button:hover, .attach-button:hover { border-color: #bcd5cc; color: #276f5d; background: #f1f7f4; transform: translateY(-1px); }
.text-button { color: #2b806a; }
.engine-status { color: #7c8881; }

.panel-view.active { animation: panel-enter .34s cubic-bezier(.2, .75, .25, 1) both; }
@keyframes panel-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

.conversation-tools { min-height: 58px; padding: 9px 24px; border-color: #edf1ef; background: #fbfcfb; }
.field-inline { color: #737f78; }
.field-inline select, .run-option select { padding: 8px 12px; border-radius: 999px; color: #334039; background: #ffffff; }
.run-option { border-color: #e4eae7; }
.team-switch { color: #4d5a53; }
.team-switch span { width: 34px; height: 20px; border-color: #cbd6d1; border-radius: 999px; background: #e6ece9; }
.team-switch span::after { width: 16px; height: 16px; background: #fff; box-shadow: 0 2px 5px rgba(34, 54, 45, .17); }
.team-switch input:checked + span { border-color: #348b74; background: #3b947c; }
.team-switch input:checked + span::after { transform: translateX(14px); background: #fff; }

.chat-scroll { background: #ffffff; }
.empty-index { display: inline-grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; color: #24725f; background: #e9f5f0; font-family: inherit; font-size: 13px; font-weight: 750; }
.empty-state h2 { color: #1e2a24; }
.empty-state p { color: #7a867f; }
.starter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.starter-grid button { min-height: 58px; padding: 12px 17px; border-color: #e0e7e3; border-radius: 999px; color: #4d5a53; background: #fbfcfb; text-align: center; transition: all .2s ease; }
.starter-grid button:hover { border-color: #bdd9d0; color: #236d5a; background: #eff7f4; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(38, 92, 72, .08); }

.message-mark { border-radius: 50%; color: #226c59; background: #e5f3ee; }
.message.user .message-mark { color: #a84f47; background: #fff0ed; }
.message-content, .message.user .message-content { color: #354139; }
.message.user .message-content { border-radius: 20px; background: #f3f7f5; }
.message-meta { color: #8b958f; }
.message-thinking-body { border-color: #dfe6e2; }
.message-file-card, .message.user .message-file-card, .files-list .message-file-card { border-color: #dfe7e3; border-radius: 18px; color: #36433c; background: #ffffff; }
.message-file-card:hover { border-color: #bad6cd; background: #f4f9f7; }
.message-file-copy strong { color: #2d3933; }
.message-file-copy small { color: #849089; }
.message-file-icon { border-radius: 14px; color: #286e5d; background: #e6f2ee; }

.composer-wrap { padding: 0 24px 18px; border-color: #e9eeeb; background: #ffffff; }
.composer { border-color: #d9e3de; border-radius: 28px; background: #ffffff; box-shadow: 0 10px 32px rgba(31, 61, 48, .08); transition: border-color .2s ease, box-shadow .2s ease; }
.composer:focus-within { border-color: #69ad9b; box-shadow: 0 12px 36px rgba(31, 99, 80, .12); }
.composer textarea { border-radius: 0; color: #29352f; }
.composer-actions { border-color: #edf1ef; }
.attachment-chip, .message-attachment { border-color: #cfe2db; border-radius: 999px; color: #286e5d; background: #edf7f3; }
.new-message-notice { border-color: #82bbaa; border-radius: 999px; color: #245f50; background: #edf7f3; box-shadow: 0 7px 20px rgba(34, 86, 67, .12); }

.context-bar section { border-color: #e7ece9; }
.context-heading { color: #57645d; }
.team-person { border: 0; border-radius: 999px; color: #425047; background: #edf5f1; }
.files-list .message-file-card { box-shadow: 0 5px 15px rgba(33, 61, 49, .04); }

.page-heading { padding-top: 42px; }
.page-heading h2 { color: #1c2822; font-size: 27px; }
.eyebrow { color: #2f846d; font-weight: 700; }
.page-copy { color: #75827b; }
.resource-card, .agent-card { border-color: #e0e7e3; border-radius: 24px; color: #344038; background: #ffffff; box-shadow: 0 8px 22px rgba(35, 63, 51, .05); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.resource-card:hover, .agent-card:hover { border-color: #c5ddd5; transform: translateY(-3px); box-shadow: 0 13px 30px rgba(35, 83, 63, .09); }
.resource-card h3, .agent-card h3 { color: #26332c; }
.resource-card p, .agent-card p { color: #76827b; }
.count-badge, .tag { border-radius: 999px; color: #286f5d; background: #eaf5f1; }

.wallet-summary { margin-bottom: 28px; border: 0; gap: 12px; }
.wallet-summary > div { border: 1px solid #e0e7e3; border-radius: 24px; background: #fff; box-shadow: 0 8px 22px rgba(35, 63, 51, .05); }
.wallet-summary span { color: #7a867f; }
.wallet-summary strong { color: #1d6b57; }
.billing-section { padding: 18px; border: 1px solid #e0e7e3; border-radius: 24px; background: #fff; box-shadow: 0 8px 22px rgba(35, 63, 51, .05); }
.billing-mode-notice { border: 0; border-radius: 999px; color: #5d6a62; background: #f2f7f5; }
.data-row { border-color: #e8edea; }
.data-row strong { color: #35423b; }
.data-row span { color: #849088; }

.settings-layout { padding: 22px; border: 1px solid #e0e7e3; border-radius: 26px; background: #fff; box-shadow: 0 10px 28px rgba(35, 63, 51, .06); }
.setting-row { border-color: #e9eeeb; }
.setting-row span { color: #77837c; }
.setting-row strong { color: #2e3b34; }

.home-view { width: min(1240px, calc(100% - 72px)); margin: auto; padding: 42px 0 56px; }
.home-intro { max-width: 710px; margin-bottom: 36px; }
.home-kicker { display: inline-flex; padding: 8px 13px; border-radius: 999px; color: #27745f; background: #e9f5f0; font-size: 10px; font-weight: 750; }
.home-intro h1 { margin: 17px 0 12px; color: #17231d; font-size: 42px; font-weight: 720; }
.home-intro p { margin: 0; color: #75827b; font-size: 16px; line-height: 1.75; }
.home-primary { display: inline-flex; min-height: 49px; align-items: center; gap: 22px; margin-top: 25px; padding: 0 9px 0 21px; border: 0; border-radius: 999px; color: #fff; background: #2f8f78; cursor: pointer; font-weight: 680; box-shadow: 0 10px 24px rgba(47, 143, 120, .2); transition: all .22s ease; }
.home-primary b { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #2f8f78; background: #fff; }
.home-primary:hover { transform: translateY(-2px); background: #247660; box-shadow: 0 14px 30px rgba(47, 143, 120, .25); }
.module-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 15px; }
.module-card { position: relative; display: flex; min-height: 250px; flex-direction: column; align-items: flex-start; padding: 22px; border: 1px solid #e1e7e4; border-radius: 30px; color: #25322b; background: #fff; cursor: pointer; text-align: left; box-shadow: 0 9px 25px rgba(37, 64, 52, .05); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.module-card:hover { border-color: #c7dcd5; transform: translateY(-5px); box-shadow: 0 18px 38px rgba(37, 82, 63, .1); }
.module-card-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; color: #a66358; background: #fff0ed; font-size: 15px; font-weight: 750; }
.module-card:nth-child(3) .module-card-icon { color: #9a6e20; background: #fff6df; }
.module-card:nth-child(4) .module-card-icon { color: #596d9e; background: #eef2fb; }
.module-card:nth-child(5) .module-card-icon { color: #202020; background: #f0f0f0; }
.module-card.ready .module-card-icon { color: #25705d; background: #e7f4ef; }
.module-card small { position: absolute; top: 24px; right: 20px; padding: 6px 10px; border-radius: 999px; color: #a3685f; background: #fff2ef; font-size: 10px; }
.module-card.ready small { color: #26715e; background: #e8f5f0; }
.module-card strong { margin-top: 22px; font-size: 18px; }
.module-card p { margin: 9px 0 20px; color: #7a867f; font-size: 13px; line-height: 1.65; }
.module-card b { margin-top: auto; color: #367e6b; font-size: 12px; }

.development-view { display: flex; width: min(620px, calc(100% - 48px)); margin: auto; flex-direction: column; align-items: center; padding: 70px 30px; text-align: center; }
.development-icon { display: grid; width: 82px; height: 82px; place-items: center; border-radius: 50%; color: #2b7a66; background: #e8f5f0; box-shadow: 0 12px 30px rgba(47, 120, 96, .11); font-size: 24px; font-weight: 750; animation: gentle-float 3.2s ease-in-out infinite; }
.status-pill { margin-top: 24px; padding: 7px 13px; border-radius: 999px; color: #a46d1e; background: #fff5df; font-size: 11px; font-weight: 700; }
.development-view h2 { margin: 15px 0 9px; color: #1d2923; font-size: 31px; }
.development-view p { margin: 0; color: #7a867f; font-size: 14px; }
.development-view button { margin-top: 25px; padding: 11px 19px; border: 1px solid #d8e3de; border-radius: 999px; color: #356c5d; background: #fff; cursor: pointer; transition: all .2s ease; }
.development-view button:hover { border-color: #b9d4ca; background: #edf7f3; transform: translateY(-2px); }

/* Deterministic rewrite workspace */
#rewrite-panel { background: #f6f7f9; }
.rewrite-shell { display: grid; min-height: 100%; flex: 1 0 auto; grid-template-columns: 258px minmax(620px, 1fr) 330px; background: #f6f7f9; color: #202735; }
.rewrite-shell * { letter-spacing: 0; }
.rewrite-menu { border-right: 1px solid #e4e7ec; background: #fff; }
.rewrite-menu header { padding: 24px 18px 20px; border-bottom: 1px solid #eef0f4; }
.rewrite-menu header h2 { margin: 0 0 3px; font-size: 18px; letter-spacing: 0; }
.rewrite-menu header p { margin: 0; color: #8993a4; font-size: 12px; }
.rewrite-menu nav { display: grid; gap: 4px; padding: 18px 12px; }
.rewrite-menu nav button { display: grid; min-height: 48px; grid-template-columns: 25px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: 6px; color: #5d6778; text-align: left; background: transparent; }
.rewrite-menu nav button > span { display: grid; width: 24px; height: 24px; place-items: center; color: #67748b; font-size: 13px; font-weight: 700; }
.rewrite-menu nav button b { overflow: hidden; font-size: 14px; font-weight: 560; text-overflow: ellipsis; white-space: nowrap; }
.rewrite-menu nav button small { color: #9aa3b1; font-size: 10px; white-space: nowrap; }
.rewrite-menu nav button:hover { background: #eef6f1; }
.rewrite-menu nav button.active { color: #fff; background: #1f8559; box-shadow: 0 6px 14px rgba(31, 133, 89, .18); }
.rewrite-menu nav button.active > span, .rewrite-menu nav button.active small { color: #fff; }
.rewrite-workspace { min-width: 0; padding: 32px clamp(28px, 4vw, 64px) 54px; }
.rewrite-notice { display: flex; max-width: 1040px; min-height: 52px; align-items: center; gap: 12px; margin: 0 auto; padding: 11px 16px; border: 1px solid #e5c98c; border-radius: 8px; color: #596172; background: #fbf8f1; }
.rewrite-notice > span { display: grid; width: 19px; height: 19px; flex: 0 0 19px; place-items: center; color: #bd7c13; }
.rewrite-notice > span img { display: block; width: 100%; height: 100%; }
.rewrite-notice p { margin: 0; font-size: 12px; line-height: 1.7; }
.rewrite-notice strong { color: #a56a0b; }
.rewrite-heading { max-width: 1040px; margin: 24px auto 0; padding: 0 0 22px; border-bottom: 1px solid #dfe3e9; text-align: center; }
.rewrite-heading h2 { margin: 0 0 8px; color: #18202d; font-size: 27px; letter-spacing: 0; }
.rewrite-heading p { margin: 0; color: #99a3b4; font-size: 13px; }
.rewrite-tabs { display: flex; width: 250px; margin: 32px auto 8px 0; padding: 4px; border-radius: 8px; background: #e9ecf2; }
.rewrite-tabs button { min-height: 38px; flex: 1; border: 0; border-radius: 6px; color: #7c8698; background: transparent; font-weight: 650; }
.rewrite-tabs button.active { color: #176b47; background: #fff; box-shadow: 0 2px 7px rgba(26, 37, 62, .08); }
.rewrite-article-input, .rewrite-paragraph-input { max-width: 1040px; margin: 0 auto; }
.rewrite-field-label { display: flex; align-items: baseline; gap: 7px; margin: 8px 0 9px; }
.rewrite-field-label strong { font-size: 14px; }
.rewrite-field-label em { color: #d2564b; font-style: normal; }
.rewrite-field-label span { color: #9aa3b2; font-size: 11px; }
.academic-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 28px 0 22px; }
.academic-form-grid label { display: grid; grid-template-rows: 18px 42px 17px; align-content: start; gap: 7px; color: #4e5869; font-size: 12px; }
.academic-form-grid label > span { font-weight: 650; }
.academic-form-grid em { color: #d2564b; font-style: normal; }
.academic-form-grid input, .academic-form-grid select { width: 100%; min-height: 42px; padding: 0 11px; border: 1px solid #d8dee8; border-radius: 6px; color: #263044; background: #fff; font: inherit; outline: 0; }
.academic-form-grid .app-select-trigger { min-height: 42px; }
.academic-form-grid input:focus, .academic-form-grid select:focus { border-color: #3a9068; box-shadow: 0 0 0 3px rgba(31, 133, 89, .10); }
.academic-form-grid small { min-height: 17px; color: #929cab; line-height: 1.45; }
.rewrite-dropzone { display: flex; min-height: 202px; cursor: pointer; align-items: center; justify-content: center; flex-direction: column; padding: 24px; border: 1px dashed #4f7d68; border-radius: 8px; color: #c7ded2; background: #19382c; transition: border-color .16s, background .16s; }
.rewrite-dropzone:hover, .rewrite-dropzone.dragging { border-color: #68b38e; background: #204535; }
.rewrite-upload-icon { display: grid; width: 42px; height: 42px; place-items: center; margin-bottom: 10px; color: #b4d6c5; font-size: 31px; font-weight: 300; }
.rewrite-dropzone strong { font-size: 13px; font-weight: 450; }
.rewrite-dropzone u { display: inline-block; margin-left: 5px; padding: 7px 13px; border: 1px solid #31815d; border-radius: 6px; color: #84c7a6; text-decoration: none; }
.rewrite-dropzone small { margin-top: 12px; color: #9ebbad; font-size: 11px; }
.rewrite-selected { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 16px; margin-top: 10px; padding: 10px 14px; border: 1px solid #dfe4ed; border-radius: 7px; background: #fff; }
.rewrite-selected div { display: grid; min-width: 0; gap: 3px; }
.rewrite-selected strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.rewrite-selected span { color: #929cab; font-size: 11px; }
.rewrite-selected button { width: 32px; height: 32px; border: 0; border-radius: 50%; color: #8c96a5; background: #f0f2f6; font-size: 18px; }
.academic-quote { margin-top: 18px; padding: 16px; border: 1px solid #cfe0d6; border-radius: 8px; background: #f7fbf8; }
.academic-quote header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.academic-quote header span { color: #267559; font-size: 12px; }
.academic-quote dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.academic-quote dl div { display: grid; gap: 4px; }
.academic-quote dt { color: #8b95a5; font-size: 11px; }
.academic-quote dd { margin: 0; color: #263044; font-size: 14px; font-weight: 700; }
.academic-quote p { margin: 13px 0 0; color: #788395; font-size: 11px; line-height: 1.65; }
.rewrite-submit-bar { display: flex; max-width: 1040px; align-items: center; justify-content: center; gap: 18px; margin: 34px auto 0; padding-top: 26px; border-top: 1px solid #e5e8ed; }
.rewrite-submit-bar p { max-width: 430px; margin: 0; color: #8993a3; font-size: 12px; }
.rewrite-submit-bar p.error { color: #b8453f; }
.rewrite-submit-bar p.success { color: #267559; }
.rewrite-submit-bar .send-button { min-width: 230px; min-height: 46px; justify-content: center; border: 0; background: #1f8559; }
.rewrite-submit-bar .send-button:disabled { color: #fff; background: #9ab5a8; opacity: 1; }
.rewrite-guide { margin: 32px 24px 32px 0; align-self: start; padding: 22px; border: 1px solid #e0e4eb; border-radius: 8px; background: #fff; box-shadow: 0 3px 9px rgba(27, 35, 51, .035); }
.rewrite-guide > h3 { margin: 0; padding-bottom: 15px; border-bottom: 1px solid #e5e8ed; font-size: 15px; }
.rewrite-guide ol { display: grid; gap: 21px; margin: 20px 0 0; padding: 0; list-style: none; }
.rewrite-guide li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 9px; }
.rewrite-guide li > span { display: grid; width: 28px; height: 25px; place-items: center; border-radius: 5px; color: #1f8559; background: #e5f3eb; font-size: 11px; font-weight: 750; }
.rewrite-guide li strong { color: #344055; font-size: 13px; }
.rewrite-guide li p, .rewrite-guide > section p { margin: 7px 0 0; color: #9aa3b2; font-size: 12px; line-height: 1.65; }
.rewrite-guide > section { margin-top: 22px; padding-top: 18px; border-top: 1px solid #e8ebf0; }
.rewrite-guide > section strong { color: #596477; font-size: 12px; }
html[data-theme="dark"] #rewrite-panel,
html[data-theme="dark"] .rewrite-shell { color: #dce4df; background: #111513; }
html[data-theme="dark"] .rewrite-menu, html[data-theme="dark"] .rewrite-guide, html[data-theme="dark"] .rewrite-selected { border-color: #303934; background: #171c1a; }
html[data-theme="dark"] .rewrite-menu header, html[data-theme="dark"] .rewrite-heading, html[data-theme="dark"] .rewrite-guide > h3, html[data-theme="dark"] .rewrite-guide > section, html[data-theme="dark"] .rewrite-submit-bar { border-color: #303934; }
html[data-theme="dark"] .rewrite-heading h2, html[data-theme="dark"] .rewrite-menu header h2 { color: #edf3f0; }
html[data-theme="dark"] .rewrite-notice { border-color: #705c31; color: #c4bbb0; background: #262219; }
html[data-theme="dark"] .rewrite-tabs { background: #222925; }
html[data-theme="dark"] .rewrite-tabs button.active { color: #9ad5b5; background: #303936; }
html[data-theme="dark"] .academic-form-grid input, html[data-theme="dark"] .academic-form-grid select { border-color: #38423d; color: #e1e8e4; background: #171c1a; }
html[data-theme="dark"] .academic-quote { border-color: #35473d; background: #19221d; }
html[data-theme="dark"] .academic-quote dd { color: #e1e8e4; }
@media (max-width: 1100px) {
  .rewrite-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .rewrite-guide { grid-column: 2; margin: 0 24px 32px; }
}
@media (max-width: 720px) {
  .rewrite-shell { display: block; min-width: 0; }
  .rewrite-menu { border-right: 0; border-bottom: 1px solid #e4e7ec; }
  .rewrite-menu header { padding: 20px 16px 15px; }
  .rewrite-menu nav { grid-template-columns: minmax(0, 1fr); padding: 10px 12px 14px; }
  .rewrite-workspace { padding: 22px 14px 34px; }
  .academic-form-grid { grid-template-columns: 1fr; }
  .academic-quote dl { grid-template-columns: 1fr; }
  .rewrite-submit-bar { align-items: stretch; flex-direction: column; }
  .rewrite-submit-bar .send-button { width: 100%; min-width: 0; }
  .rewrite-guide { margin: 0 14px 24px; }
}
@keyframes gentle-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.modal-backdrop { background: rgba(31, 42, 36, .3); backdrop-filter: blur(8px); }
.auth-panel, .dialog-card, .announcement-dialog { border-color: #dfe7e3; border-radius: 30px; color: #2a362f; background: #fff; box-shadow: 0 24px 70px rgba(24, 48, 37, .16); }
.auth-tabs { border-radius: 999px; background: #f1f5f3; }
.auth-tabs button { border-radius: 999px; color: #6e7973; }
.auth-tabs button.active { color: #226a58; background: #fff; box-shadow: 0 4px 12px rgba(37, 69, 57, .09); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* 2026 visual refresh: dark stellar canvas with restrained glass surfaces. */
:root {
  --bg: #050607;
  --panel: rgba(14, 16, 18, .82);
  --panel-2: rgba(21, 24, 27, .86);
  --panel-3: #202429;
  --line: rgba(184, 205, 206, .14);
  --line-soft: rgba(184, 205, 206, .09);
  --text: #f3f5f3;
  --muted: #8e9997;
  --blue: #638b85;
  --blue-strong: #9abbb4;
  --green: #82ad94;
  --amber: #c4ad88;
  --red: #c18e8e;
  --paper: #d9e1df;
}

/* White palette corrections for legacy conversation and announcement rules. */
:root {
  --bg: #f7f9f8;
  --panel: #ffffff;
  --panel-2: #f4f7f5;
  --panel-3: #edf2ef;
  --line: #dde5e1;
  --line-soft: #e9eeeb;
  --text: #18211d;
  --muted: #748079;
  --blue: #2f8f78;
  --blue-strong: #20735f;
  --green: #33a284;
  --amber: #d29a3a;
  --red: #db6b61;
  --paper: #3e4a44;
}
body { color: var(--text); background: #f7f9f8; }
.sidebar, .context-bar { border-color: #e5ebe7; background: #fbfcfb; backdrop-filter: none; }
.main-area { background: #fff; backdrop-filter: none; }
/* Brand mark: the SVG is pure black line art on a fully transparent canvas, so the mark
   needs no plate of its own. Dark mode simply inverts the ink to pure white; the elements
   carry no background, so the filter can never tint anything behind them. */
.global-brand .brand-mark, .auth-panel .brand-mark {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  object-fit: contain;
}
html[data-theme="dark"] .global-brand .brand-mark,
html[data-theme="dark"] .auth-panel .brand-mark,
html[data-theme="dark"] .footer-mark { filter: invert(1); }
.footer-mark {
  width: 36px;
  height: 45px;
  flex: 0 0 auto;
  object-fit: contain;
}
.primary-button, .primary-small, .send-button { border-color: #2d8b73; border-radius: 999px; color: #fff; background: #2d8b73; box-shadow: 0 7px 18px rgba(45, 139, 115, .15); }
.primary-button:hover, .primary-small:hover, .send-button:hover { background: #247660; }
.search-box input, input, select, textarea { border-color: #dce5e0; border-radius: 999px; color: #24302a; background: #fff; }
select { appearance:none; padding-right:38px !important; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='m3.5 5 3.5 3.5L10.5 5' fill='none' stroke='%236c7d74' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-position:right 13px center; background-repeat:no-repeat; background-size:14px; }
input:focus, select:focus, textarea:focus { border-color: #67ad9b; box-shadow: 0 0 0 4px rgba(64, 148, 126, .1); }
.conversation-item { border: 1px solid transparent; border-radius: 18px; color: #445149; }
.conversation-item:hover { background: #f3f7f5; }
.conversation-item.active { border-color: #cfe3dc; color: #1d5d4d; background: #eaf5f1; }
.side-link { border-radius: 999px; }
.side-link:hover, .side-link.active { color: #175f4d; background: #fff; }
.account-avatar { border-color: #cce1da; color: #236e5b; background: #eaf5f1; }
.topbar { border-color: #e8edea; background: #fff; }
.topic h1 { color: #1c2721; }
.quiet-button, .text-button, .icon-button, .attach-button, .stop-button { border-color: #dce4e0; border-radius: 999px; color: #526058; background: #fff; }
.quiet-button:hover, .icon-button:hover, .attach-button:hover { border-color: #bcd5cc; color: #276f5d; background: #f1f7f4; }
.conversation-tools { border-color: #edf1ef; background: #fbfcfb; }
.field-inline, .team-switch { color: #657169; }
.chat-scroll { background: #fff; }
.empty-index { color: #24725f; }
.empty-state p { color: #7a867f; }
.starter-grid button { border-color: #e0e7e3; border-radius: 999px; color: #4d5a53; background: #fbfcfb; }
.starter-grid button:hover { border-color: #bdd9d0; color: #236d5a; background: #eff7f4; }
.message { width: min(100%, 900px); max-width: 900px; gap: 0; align-items: flex-start; margin-bottom: 30px; }
.message-mark, .message-meta { display: none; }
.message-body { width: 100%; flex: 0 1 auto; }
.message.assistant .message-body { max-width: 100%; }
.message.user { justify-content: flex-end; }
.message.user .message-body {
  display: flex;
  width: auto;
  max-width: min(72%, 620px);
  flex: 0 1 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}
.message-content, .message.assistant .message-content { color: #354139; }
.message.user .message-content { width: fit-content; max-width: 100%; border-color: #e3eae6; border-radius: 20px; color: #354139; background: #f3f7f5; }
.message-content h1, .message-content h2, .message-content h3, .message-content h4, .message-content strong { color: #202d26; }
.message-content a { color: #24745f; }
.message-content blockquote { border-color: #4c9b84; color: #647169; }
.message-content code { color: #266855; background: #edf6f2; }
.message-content pre { border-color: #dce5e0; background: #f5f8f6; }
.message-content pre code { color: #354139; }
.message-content th { color: #26332c; background: #edf6f2; }
.message-thinking-body { border-color: #dfe6e2; }
.message-run-status, .message-worklog-empty { color: #75817a; }
.message-worklog-entry { color: #354139; font-size: 14px; line-height: 1.65; }
.message-worklog-entry + .message-worklog-entry { border-color: #e7ece9; }
.message-worklog-entry strong { color: #34423a; }
.message-worklog-entry code { color: #286b59; background: #edf6f2; }
.message-worklog-entry pre { border-color: #dfe7e3; background: #f6f9f7; }
.message-attachment { border-color: #cfe2db; border-radius: 999px; color: #286e5d; background: #edf7f3; }
.composer-wrap { border-color: #e9eeeb; background: #fff; }
.composer { border-color: #d9e3de; border-radius: 28px; background: #fff; box-shadow: 0 10px 32px rgba(31, 61, 48, .08); }
.composer:focus-within { border-color: #69ad9b; box-shadow: 0 12px 36px rgba(31, 99, 80, .12); }
.composer-actions { border-color: #edf1ef; }
.context-heading { color: #57645d; }
.resource-card, .agent-card { border-color: #e0e7e3; border-radius: 24px; color: #344038; background: #fff; }
.resource-card:hover, .agent-card:hover { border-color: #c5ddd5; }
.count-badge { border-color: #cfe2db; border-radius: 999px; color: #286f5d; background: #eaf5f1; }
.billing-section { border-color: #e0e7e3; }
.billing-mode-notice { border: 0; color: #5d6a62; background: #f2f7f5; }
.modal-backdrop { background: rgba(31, 42, 36, .3); backdrop-filter: blur(8px); }
.auth-panel, .dialog-card { border-color: #dfe7e3; border-radius: 30px; color: #2a362f; background: #fff; box-shadow: 0 24px 70px rgba(24, 48, 37, .16); }
.auth-panel .brand-mark { margin-bottom: 14px; }
.auth-tabs button.active { color: #226a58; }
.announcement-trigger > span { color: #2f8f78; }
.announcement-dialog { border-color: #dfe7e3; border-radius: 28px; color: #2a362f; background: #fff; box-shadow: 0 24px 70px rgba(24, 48, 37, .16); }
.announcement-header { border-color: #e5ebe7; background: #f7faf8; }
.announcement-mark, .announcement-state { border-color: #cfe2db; border-radius: 50%; color: #27705e; background: #eaf5f1; }
.announcement-summary, .announcement-item, .announcement-detail-meta { border-color: #e8edea; }
.announcement-summary strong { color: #4e5d55; }
.announcement-item { color: #27342d; }
.announcement-item:hover, .announcement-item.unread { background: #f1f7f4; }
.announcement-item.unread .announcement-copy strong { color: #1f2c25; }
.announcement-detail-label { border-radius: 999px; color: #27705e; background: #eaf5f1; }
.announcement-detail-content { color: #3c4942; }
.announcement-detail-foot { border-color: #e5ebe7; background: #fff; }
.message-file-card, .message.user .message-file-card, .files-list .message-file-card { border-color: #dfe7e3; border-radius: 18px; color: #36433c; background: #fff; }
.message-file-card:hover { border-color: #bad6cd; background: #f4f9f7; }
.message-file-icon { border-radius: 14px; color: #286e5d; background: #e6f2ee; }
.message-file-copy strong { color: #2d3933; }
.message-file-copy small { color: #849089; }

@layer legacy-dark-theme {
body {
  background: #050607;
  color: var(--text);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}


.app-shell { position: relative; z-index: 1; }
.sidebar, .context-bar {
  background: rgba(8, 10, 12, .74);
  border-color: var(--line);
  backdrop-filter: blur(18px) saturate(105%);
}
.main-area { background: rgba(9, 11, 13, .52); backdrop-filter: blur(7px); }
.sidebar { padding: 19px 13px 13px; }

.brand { gap: 11px; padding: 4px 8px 21px; }
.brand-mark {
  display: block;
  flex: 0 0 auto;
  width: 42px;
  height: 54px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
  object-position: center;
}
.brand strong { font-size: 18px; font-weight: 740; letter-spacing: .4px; line-height: 1.2; }
.brand span, .eyebrow { color: #6f8985; letter-spacing: 1.35px; }

.primary-button, .primary-small, .send-button {
  border-color: rgba(174, 199, 193, .74);
  border-radius: 6px;
  color: #041110;
  background: #93afa9;
  box-shadow: 0 7px 22px rgba(103, 143, 136, .14);
}
.primary-button:hover, .primary-small:hover, .send-button:hover { background: #a8c1bc; }
.search-box input, input, select, textarea {
  border-color: var(--line);
  border-radius: 6px;
  background: rgba(3, 5, 6, .58);
}
select { appearance:none; padding-right:38px !important; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='m3.5 5 3.5 3.5L10.5 5' fill='none' stroke='%239abbb4' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-position:right 13px center; background-repeat:no-repeat; background-size:14px; }
input:focus, select:focus, textarea:focus { border-color: rgba(154, 187, 180, .72); box-shadow: 0 0 0 3px rgba(103, 143, 136, .11); }

.conversation-item { border-left-color: transparent; border-radius: 6px; }
.conversation-item:hover { background: rgba(113, 155, 152, .09); }
.conversation-item.active { border-left-color: #9abbb4; background: rgba(103, 143, 136, .14); }
.side-link { border-radius: 6px; transition: color .18s ease, background .18s ease; }
.side-link:hover, .side-link.active { color: #e8fbf8; background: rgba(115, 164, 158, .1); }
.account-avatar { border-color: rgba(154, 187, 180, .42); background: rgba(63, 91, 87, .32); }

.topbar { border-color: var(--line); background: rgba(8, 10, 12, .46); }
.topic h1 { font-weight: 650; letter-spacing: .15px; }
.engine-status i { background: var(--amber); box-shadow: 0 0 12px rgba(231, 180, 106, .45); }
.engine-status.ready i { background: var(--green); box-shadow: 0 0 11px rgba(105, 220, 167, .6); }
.quiet-button, .text-button, .icon-button, .attach-button, .stop-button {
  border-color: var(--line);
  border-radius: 6px;
  background: rgba(21, 25, 28, .62);
}
.quiet-button:hover, .icon-button:hover, .attach-button:hover { border-color: rgba(154, 187, 180, .45); background: rgba(103, 143, 136, .12); }
.conversation-tools { border-color: var(--line-soft); background: rgba(12, 14, 16, .38); }
.field-inline, .team-switch { color: #a7b4b1; }
.field-inline + .field-inline, .run-option { border-color: var(--line-soft); }

.chat-scroll { background: rgba(6, 8, 9, .16); }
.empty-state { max-width: 700px; margin: max(9vh, 68px) auto; }
.empty-index { color: #9abbb4; }
.empty-state h2 { font-size: 29px; font-weight: 650; letter-spacing: .2px; }
.empty-state p { color: #99a6a3; }
.starter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 660px; }
.starter-grid button {
  min-height: 68px;
  padding: 13px 14px;
  border-color: var(--line);
  border-radius: 6px;
  background: rgba(18, 22, 24, .58);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.starter-grid button:hover { border-color: rgba(154, 187, 180, .54); background: rgba(103, 143, 136, .12); transform: translateY(-2px); }
.message { max-width: 900px; }
.message-mark { border: 1px solid rgba(154, 187, 180, .36); border-radius: 6px; background: rgba(63, 91, 87, .33); }
.message.user .message-mark { background: rgba(29, 110, 128, .43); }
.message-content { color: #dbe4e1; }
.message-attachment { border-color: rgba(154, 187, 180, .26); color: #c2d6d1; background: rgba(45, 68, 65, .24); }

.composer-wrap { border-color: var(--line); background: rgba(8, 10, 12, .65); }
.composer { border-color: rgba(188, 209, 207, .22); border-radius: 8px; background: rgba(5, 7, 8, .7); box-shadow: 0 16px 34px rgba(0, 0, 0, .16); }
.composer:focus-within { border-color: rgba(154, 187, 180, .72); box-shadow: 0 0 0 3px rgba(103, 143, 136, .1), 0 16px 34px rgba(0, 0, 0, .18); }
.composer-actions { border-color: var(--line-soft); }
.send-button { min-width: 72px; }
.context-bar section { border-color: var(--line-soft); }
.context-heading { color: #b9c6c3; }

.resource-card, .agent-card { border-color: var(--line); border-radius: 7px; background: rgba(18, 22, 24, .66); }
.resource-card:hover, .agent-card:hover { border-color: rgba(154, 187, 180, .36); }
.count-badge { border-color: rgba(154, 187, 180, .32); color: #c3d7d2; background: rgba(103, 143, 136, .12); }
.wallet-summary, .settings-layout { border-color: var(--line); }
.wallet-summary > div, .setting-row { border-color: var(--line); }
.billing-section { border-top-color: rgba(154, 187, 180, .46); }
.billing-mode-notice { border-left-color: #9abbb4; background: rgba(103, 143, 136, .1); }

.modal-backdrop { z-index: 10; background: rgba(2, 3, 4, .34); backdrop-filter: blur(3px); }
.auth-panel, .dialog-card { max-width: calc(100vw - 36px); border-color: rgba(188, 209, 207, .2); border-radius: 8px; background: rgba(13, 16, 18, .94); box-shadow: 0 28px 90px rgba(0, 0, 0, .58); }
.auth-tabs button.active { border-bottom-color: #9abbb4; color: #e8efed; }

@media (max-width: 720px) {
  .modal-backdrop { padding: 14px; }
  .auth-panel, .dialog-card, .auth-card { width: 100%; }
  .sidebar { background: rgba(8, 10, 12, .94); }
  .starter-grid { grid-template-columns: 1fr; }
  .empty-state { margin: 6vh auto; }
  .empty-state h2 { font-size: 24px; }
}

.announcement-trigger { position: relative; display: inline-flex; min-width: 78px; align-items: center; justify-content: center; gap: 7px; }
.announcement-trigger > span { color: #9abbb4; font-size: 9px; }
.announcement-trigger b { display: grid; min-width: 18px; height: 18px; place-items: center; padding: 0 5px; border-radius: 9px; color: #fff; background: #b44f59; font-size: 10px; line-height: 1; }
.announcement-backdrop { z-index: 12; }
.announcement-dialog { width: min(680px, calc(100vw - 48px)); max-height: min(760px, calc(100vh - 48px)); overflow: hidden; border: 1px solid rgba(188, 209, 207, .2); border-radius: 8px; background: #12181d; box-shadow: 0 28px 90px rgba(0, 0, 0, .64); }
.announcement-header { display: flex; min-height: 72px; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); background: #172027; }
.announcement-header > div { display: flex; align-items: center; gap: 11px; }
.announcement-header h2 { margin: 0; font-size: 18px; }
.announcement-mark { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid rgba(154, 187, 180, .45); border-radius: 6px; color: #e9f5f2; background: rgba(103, 143, 136, .2); font-weight: 800; }
.announcement-mark img { display: block; width: 18px; height: 18px; }
.announcement-summary { display: flex; align-items: center; justify-content: space-between; padding: 13px 20px; border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: 11px; }
.announcement-summary strong { color: #b9cac6; font-weight: 600; }
.announcement-list { max-height: min(610px, calc(100vh - 170px)); overflow-y: auto; }
.announcement-item { display: grid; width: 100%; min-height: 78px; grid-template-columns: 42px minmax(0, 1fr) 22px; align-items: center; gap: 12px; padding: 13px 20px; border: 0; border-bottom: 1px solid var(--line-soft); color: var(--text); background: transparent; cursor: pointer; text-align: left; }
.announcement-item:hover { background: rgba(103, 143, 136, .08); }
.announcement-item.unread { background: rgba(103, 143, 136, .055); }
.announcement-state { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid rgba(154, 187, 180, .18); border-radius: 6px; color: #9abbb4; background: rgba(103, 143, 136, .08); font-size: 12px; }
.announcement-state img { display: block; width: 20px; height: 20px; }
.announcement-copy { min-width: 0; }
.announcement-copy strong, .announcement-copy time { display: block; }
.announcement-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.announcement-item.unread .announcement-copy strong { color: #f4f8f7; font-weight: 700; }
.announcement-copy time { margin-top: 7px; color: var(--muted); font-size: 10px; }
.announcement-arrow { color: #61716f; font-size: 24px; text-align: right; }
.announcement-empty { display: grid; min-height: 180px; place-items: center; margin: 0; color: var(--muted); }
.announcement-detail { max-height: calc(100vh - 120px); overflow-y: auto; padding: 26px 32px 0; }
.announcement-back { margin-bottom: 24px; }
.announcement-detail-label { display: inline-block; padding: 4px 8px; border-radius: 4px; color: #bcd2cd; background: rgba(103, 143, 136, .16); font-size: 10px; }
.announcement-detail h2 { margin: 12px 0 8px; font-size: 22px; line-height: 1.45; }
.announcement-detail-meta { padding-bottom: 22px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.announcement-detail-content { min-height: 150px; padding: 26px 0; color: #d3ddda; font-size: 14px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.announcement-detail-foot { display: flex; position: sticky; bottom: 0; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 0 18px; border-top: 1px solid var(--line); background: #12181d; color: var(--muted); font-size: 11px; }

/* Formatted conversation content, compact execution summaries, and in-thread files. */
.message { width: min(100%, 900px); max-width: 900px; gap: 0; align-items: flex-start; margin-bottom: 30px; }
.message-mark, .message-meta { display: none; }
.message-body { width: 100%; flex: 0 1 auto; }
.message.assistant .message-body { max-width: 100%; }
.message.user { justify-content: flex-end; }
.message.user .message-body {
  display: flex;
  width: auto;
  max-width: min(72%, 620px);
  flex-direction: column;
  align-items: flex-end;
  gap: 9px;
}
.message.user .message-content {
  width: fit-content;
  max-width: 100%;
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, .045);
  border-radius: 8px;
  color: #f3f4f2;
  background: #292b2c;
  line-height: 1.65;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.message.pending .message-content:empty { display: none; }
.message.assistant .message-content { color: #e0e3df; font-size: 14px; line-height: 1.65; white-space: normal; overflow-wrap: anywhere; }
.message.assistant .message-content > :first-child { margin-top: 0; }
.message.assistant .message-content > :last-child { margin-bottom: 0; }
.message-content h1, .message-content h2, .message-content h3, .message-content h4 {
  margin: .9em 0 .3em;
  color: #f5f6f4;
  font-weight: 680;
  line-height: 1.38;
  letter-spacing: 0;
}
.message-content h1 { font-size: 21px; }
.message-content h2 { font-size: 18px; }
.message-content h3 { font-size: 16px; }
.message-content h4 { font-size: 14px; }
.message-content p { margin: .4em 0; }
.message-content ul, .message-content ol { margin: .4em 0; padding-left: 1.55em; }
.message-content li { margin: .12em 0; padding-left: .2em; }
.message-content li > p { margin: .12em 0; }
.message-content li > ul, .message-content li > ol { margin: .18em 0; }
.message-content li::marker { color: #aeb7b4; }
.message-content strong { color: #f2f4f1; font-weight: 700; }
.message-content a { color: #9fc6be; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.message-content blockquote { margin: .65em 0; padding: 2px 0; border-left: 0; color: #b7c0bd; }
.message-content code {
  padding: 2px 5px;
  border-radius: 4px;
  color: #d8e9e4;
  background: rgba(116, 151, 143, .14);
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: .9em;
}
.message-content pre { max-width: 100%; margin: .65em 0; padding: 14px 16px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: rgba(2, 4, 5, .72); }
.message-content pre code { padding: 0; color: #d8dedc; background: transparent; }
.message-content table { display: block; max-width: 100%; margin: .65em 0; overflow-x: auto; border-collapse: collapse; }
.message-content th, .message-content td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; }
.message-content th { color: #f1f4f2; background: rgba(103, 143, 136, .12); }
.message-content hr { height: 0; margin: .9em 0; border: 0; }

.message-thinking { margin: 1px 0 18px; }
.message-thinking summary {
  display: grid;
  width: fit-content;
  max-width: 100%;
  grid-template-columns: minmax(0, auto) 18px;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  list-style: none;
}
.message-thinking summary::-webkit-details-marker { display: none; }
.message-thinking summary::after { color: #69716f; content: "›"; font-size: 17px; line-height: 1; transition: transform .16s ease; }
.message-thinking[open] summary::after { transform: rotate(90deg); }
.message-run-status {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: #818a87;
  font-size: 11px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.message-run-status::before { margin-right: 6px; color: #93aaa5; content: "·"; }
.message-thinking-body { max-width: 780px; margin-top: 12px; padding-left: 0; border-left: 0; }
.message-worklog-empty { color: #767f7c; font-size: 11px; line-height: 1.7; }
.message-worklog-entry { padding: 0 0 13px; color: #354139; font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
.message-worklog-entry + .message-worklog-entry { padding-top: 13px; border-top: 0; }
.message-worklog-entry > :first-child { margin-top: 0; }
.message-worklog-entry > :last-child { margin-bottom: 0; }
.message-worklog-entry p { margin: .45em 0; }
.message-worklog-entry ul, .message-worklog-entry ol { margin: .5em 0; padding-left: 1.4em; }
.message-worklog-entry strong { color: #abb3b0; }
.message-worklog-entry code { padding: 1px 4px; border-radius: 3px; color: #afc3be; background: rgba(103, 143, 136, .11); }
.message-worklog-entry pre { max-width: 100%; padding: 10px; overflow: auto; border: 1px solid var(--line-soft); border-radius: 5px; background: rgba(2, 4, 5, .45); }
html[data-theme="dark"] .message-worklog-entry { color: #d6dfda; }
html[data-theme="dark"] .message-worklog-entry strong { color: #edf3f0; }
html:not([data-theme="dark"]) .message-worklog-entry strong { color: #202d26; }

.message-file-section { width: 100%; margin-top: 16px; }
.message-file-section.upload { width: auto; margin-top: 0; }
.message-file-label { margin-bottom: 8px; color: #8f9895; font-size: 12px; }
.message-file-section.upload .message-file-label { display: none; }
.message-file-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.message-file-section.upload .message-file-grid { grid-template-columns: minmax(0, 300px); }
.message-file-card {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 66px;
  grid-template-columns: 42px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(173, 187, 183, .18);
  border-radius: 8px;
  color: #e7eae7;
  background: #202324;
  cursor: pointer;
  text-align: left;
  transition: border-color .16s ease, background .16s ease;
}
.message-file-card:hover { border-color: rgba(154, 187, 180, .45); background: #25292a; }
.message-file-card:disabled { cursor: default; opacity: .62; }
.message-file-icon { display: grid; width: 38px; height: 42px; place-items: center; border-radius: 6px; color: #d8e8e4; background: rgba(90, 131, 124, .28); font-size: 9px; font-weight: 750; }
.message-file-copy { min-width: 0; }
.message-file-copy strong, .message-file-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.message-file-copy strong { color: #ecf0ed; font-size: 12px; font-weight: 600; }
.message-file-copy small { margin-top: 5px; color: #838c89; font-size: 10px; }
.message-file-action { color: #9abbb4; font-size: 18px; text-align: center; }
.message.user .message-file-card { background: #2a2c2d; }
.files-list { gap: 7px; }
.files-list .message-file-card { min-height: 58px; grid-template-columns: 34px minmax(0, 1fr) 18px; padding: 8px; border-radius: 6px; background: rgba(25, 29, 31, .72); }
.files-list .message-file-icon { width: 31px; height: 35px; font-size: 8px; }
.files-list .message-file-action { font-size: 15px; }

@media (max-width: 720px) {
  .message { margin-bottom: 24px; }
  .message.user .message-body { max-width: 88%; }
  .message.user .message-content { padding: 10px 12px; }
  .message-file-grid { grid-template-columns: 1fr; }
  .message-thinking summary { max-width: calc(100vw - 28px); }
  .message-thinking-body { padding-left: 0; }
}
}

/* Markdown block separators must not inherit the legacy pre-wrap conversation rule. */
.message.assistant .message-content {
  line-height: 1.65;
  white-space: normal;
}

@media (max-width: 720px) {
  .app-shell, .app-shell[data-module] {
    display: grid;
    width: 100%;
    min-width: 0;
    height: 100vh;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 64px auto minmax(0, 1fr);
    overflow: hidden;
  }
  .global-header, .app-shell[data-module] .global-header {
    position: relative;
    width: 100%;
    min-width: 0;
    grid-column: 1;
    grid-row: 1;
    gap: 8px;
    padding: 8px 56px 8px 10px;
  }
  .global-brand, .app-shell[data-module] .global-brand { flex: 0 0 42px; }
  .global-brand > span, .app-shell[data-module] .global-brand > span { display: none; }
  .global-brand .brand-mark, .app-shell[data-module] .global-brand .brand-mark { width: 38px; height: 38px; flex: 0 0 38px; }
  .module-nav, .app-shell[data-module] .module-nav {
    display: flex;
    min-width: 0;
    justify-content: flex-start;
    gap: 3px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .module-nav-primary, .module-nav-account { flex: 0 0 auto; gap: 3px; }
  .module-nav-account { margin-left: 8px; }
  .module-nav::-webkit-scrollbar { display: none; }
  .module-tab, .app-shell[data-module] .module-tab { min-height: 38px; flex: 0 0 auto; padding: 0 9px; font-size: 12px; }
  .theme-toggle, .app-shell[data-module] .theme-toggle {
    position:absolute;
    top:13px;
    right:10px;
    z-index:2;
    width:38px;
    height:38px;
    flex:0 0 38px;
  }
  .global-site-banner { padding: 8px 10px; }
  .global-site-banner-inner { max-height: 118px; align-items: flex-start; padding: 9px 11px; }
  .sidebar { position: fixed; z-index: 30; inset: 64px auto 0 0; width: 254px; transform: translateX(-100%); }
  .app-shell.nav-open .sidebar { transform: translateX(0); }
  .main-area, .app-shell[data-module] .main-area { width: 100%; min-width: 0; height: auto; grid-column: 1; grid-row: 3; }
}

/* Structured writing and task center dark theme. These views are declared
   after the shared theme rules, so their module-specific colors live here. */
html[data-theme="dark"] .structured-shell,
html[data-theme="dark"] .task-center-shell {
  color: #dce5e0;
  background: #111513;
}
html[data-theme="dark"] .structured-heading h2,
html[data-theme="dark"] .task-center-heading h2 { color: #edf3f0; }
html[data-theme="dark"] .structured-heading p,
html[data-theme="dark"] .task-center-heading p { color: #8f9b95; }
html[data-theme="dark"] .structured-steps li { color: #7f8b85; }
html[data-theme="dark"] .structured-steps li::before { background: #35403b; }
html[data-theme="dark"] .structured-steps b {
  border-color: #3b4842;
  color: #9aa69f;
  background: #171c1a;
}
html[data-theme="dark"] .structured-steps li.active,
html[data-theme="dark"] .structured-steps li.complete { color: #b8e2d5; }
html[data-theme="dark"] .structured-steps li.active b,
html[data-theme="dark"] .structured-steps li.complete b {
  border-color: #65b49d;
  color: #10201b;
  background: #65b49d;
}
html[data-theme="dark"] .structured-form {
  border-color: #303a35;
  background: #171c1a;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}
html[data-theme="dark"] .structured-stage-head,
html[data-theme="dark"] .structured-actions { border-color: #303a35; }
html[data-theme="dark"] .structured-stage-head > span,
html[data-theme="dark"] .task-kind {
  color: #a9ddce;
  background: #20332d;
}
html[data-theme="dark"] .structured-stage-head h3 { color: #e7eeea; }
html[data-theme="dark"] .structured-stage-head p,
html[data-theme="dark"] .structured-field > small,
html[data-theme="dark"] .structured-field span small { color: #8f9b95; }
html[data-theme="dark"] .structured-field,
html[data-theme="dark"] .deliverable-picker legend { color: #cbd5d0; }
html[data-theme="dark"] .structured-field input,
html[data-theme="dark"] .structured-field select,
html[data-theme="dark"] .structured-field textarea {
  border-color: #3b4842;
  color: #e7eeea;
  background: #121715;
}
html[data-theme="dark"] .structured-field input:-webkit-autofill,
html[data-theme="dark"] .structured-field input:-webkit-autofill:hover,
html[data-theme="dark"] .structured-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: #e7eeea;
  caret-color: #e7eeea;
  box-shadow: 0 0 0 1000px #121715 inset;
}
html[data-theme="dark"] .deliverable-picker label {
  border-color: #35413b;
  color: #b8c3bd;
  background: #181e1b;
}
html[data-theme="dark"] .deliverable-picker label:has(input:checked),
html[data-theme="dark"] .deliverable-picker label.selected {
  border-color: #65b49d;
  color: #b8e2d5;
  background: #1c302a;
}
html[data-theme="dark"] .deliverable-picker small {
  color: #a9ddce;
  background: #263a34;
}
html[data-theme="dark"] .segmented-control {
  border-color: #35413b;
  background: #121715;
}
html[data-theme="dark"] .segmented-control button { color: #909c96; }
html[data-theme="dark"] .segmented-control button.active {
  color: #b8e2d5;
  background: #26332e;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .3);
}
html[data-theme="dark"] .structured-upload {
  border-color: #4b6259;
  color: #abb7b1;
  background: #1b211e;
}
html[data-theme="dark"] .structured-upload.dragging {
  border-color: #65b49d;
  background: #1d302a;
}
html[data-theme="dark"] .structured-upload u { color: #9ed7c6; }
html[data-theme="dark"] .structured-upload small { color: #849089; }
html[data-theme="dark"] .structured-upload-item {
  border-color: #303a35;
  color: #b7c3bd;
  background: #181e1b;
}
html[data-theme="dark"] .structured-review { border-color: #35403b; }
html[data-theme="dark"] .structured-review div { border-color: #35403b; }
html[data-theme="dark"] .structured-review span { color: #8f9b95; }
html[data-theme="dark"] .structured-review strong { color: #e0e8e4; }
html[data-theme="dark"] .payment-confirm {
  border-color: #594b30;
  color: #c9bda7;
  background: #282217;
}
html[data-theme="dark"] .payment-confirm strong { color: #eaa39d; }
html[data-theme="dark"] .task-center-filters,
html[data-theme="dark"] .task-center-table,
html[data-theme="dark"] .task-center-item { border-color: #303a35; background: #171c1a; }
html[data-theme="dark"] .task-center-filters select,
html[data-theme="dark"] .task-center-filters input { border-color: #3b4842; color: #e2ebe6; background: #121715; }
html[data-theme="dark"] .task-table-head { border-color: #303a35; color: #8f9b95; background: #202723; }
html[data-theme="dark"] .task-center-item { border-bottom-color: #303a35; }
html[data-theme="dark"] .task-center-item:hover { background: #1a231e; }
html[data-theme="dark"] .task-main-cell strong { color: #e7eeea; }
html[data-theme="dark"] .task-main-cell span,
html[data-theme="dark"] .task-center-item time { color: #8f9b95; }
html[data-theme="dark"] .task-status { color: #aebbb4; background: #29332e; }
html[data-theme="dark"] .status-succeeded .task-status { color: #9ed7b9; background: #1f3b2d; }
html[data-theme="dark"] .status-running .task-status,
html[data-theme="dark"] .status-cancelling .task-status { color: #e1c889; background: #3c321d; }
html[data-theme="dark"] .status-failed .task-status { color: #e2a19d; background: #402724; }
html[data-theme="dark"] .task-progress > div { background: #35423b; }
html[data-theme="dark"] .task-fee { color: #cbd7d0; }
html[data-theme="dark"] .task-center-actions a,
html[data-theme="dark"] .task-center-actions button {
  border-color: #3b4842;
  color: #b8e2d5;
  background: #181e1b;
}
html[data-theme="dark"] .task-row-detail { border-color: #303a35; background: #131916; }
html[data-theme="dark"] .task-row-detail strong { color: #c8d4cd; }
html[data-theme="dark"] .task-detail-files a { border-color: #3b4842; color: #b8e2d5; background: #181e1b; }

/* Product polish: compact Chinese-first controls and higher task readability. */
.eyebrow { display: none; }
.module-card-icon::before { font-size: 24px; font-weight: 500; line-height: 1; }
.icon-write::before { content: "✎"; }
.icon-structure::before { content: "▤"; }
.icon-survey::before { content: "◫"; }
.icon-rewrite::before { content: "↗"; }
.icon-diagram::before { content: "⌘"; }
.task-center-item { min-height: 86px; padding: 19px 16px; }
.task-main-cell strong { font-size: 15px; }
.task-main-cell span, .task-center-item time, .task-fee { font-size: 12px; }
.context-heading .text-button { color: #246b59; background: transparent; }
html[data-theme="dark"] {
  --bg: #080a09; --panel: #0d100f; --panel-2: #121614; --panel-3: #181d1a;
  --line: #27302b; --line-soft: #1c231f; --text: #eef3ef; --muted: #a0aaa4;
}
html[data-theme="dark"] body, html[data-theme="dark"] .app-shell,
html[data-theme="dark"] .main-area, html[data-theme="dark"] .sidebar,
html[data-theme="dark"] .context-bar { background: #0b0e0c; }
html[data-theme="dark"] .main-area { background: #0b0e0c; }
html[data-theme="dark"] .context-heading .text-button {
  padding: 3px 7px;
  border-color: transparent;
  color: #a9ddce;
  background: transparent;
}
html[data-theme="dark"] .structured-formatting-option { border-color: #35403b; background: #171d1a; }
html[data-theme="dark"] .structured-formatting-toggle { color: #d7e0db; }
html[data-theme="dark"] .context-heading .text-button:hover,
html[data-theme="dark"] .context-heading .text-button:focus-visible {
  border-color: #3b6659;
  color: #d6f1e8;
  background: #1c302a;
}

/* Keep the structured-writing form focused while leaving room for guidance. */
.structured-layout {
  display: grid;
  width: min(1540px, 100%);
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
  gap: 30px;
  margin: 0 auto;
}
.structured-workspace { min-width: 0; }
.structured-workspace .structured-heading,
.structured-workspace .structured-form { width: 100%; }
.structured-workspace .structured-steps { width: min(900px, calc(100% - 30px)); }
.structured-help {
  position: sticky;
  top: 24px;
  padding: 22px;
  border: 1px solid #dce4e0;
  border-radius: 8px;
  color: #405048;
  background: #fff;
  box-shadow: 0 8px 24px rgba(29, 56, 43, .05);
}
.structured-help-head { padding-bottom: 18px; border-bottom: 1px solid #e6ece8; }
.structured-help-head > span {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 4px;
  color: #2f6d5b;
  background: #eaf3ef;
  font-size: 11px;
  font-weight: 750;
}
.structured-help h3 { margin: 10px 0 7px; color: #24332c; font-size: 17px; }
.structured-help p { margin: 0; color: #7f8c85; font-size: 12px; line-height: 1.65; }
.structured-help-steps { display: grid; gap: 18px; margin: 20px 0; padding: 0; list-style: none; }
.structured-help-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
.structured-help-steps b {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  color: #2e6b59;
  background: #eaf3ef;
  font-size: 10px;
}
.structured-help-steps strong { display: block; margin-bottom: 4px; color: #35443c; font-size: 13px; }
.structured-help-note { padding: 14px; border: 1px solid #eadcc9; border-radius: 7px; background: #fffaf4; }
.structured-help-note strong { display: block; margin-bottom: 4px; color: #8d6033; font-size: 12px; }
.structured-help-note p { color: #806d5a; }
html[data-theme="dark"] .structured-help {
  border-color: #303a35;
  color: #dce5e0;
  background: #171c1a;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
}
html[data-theme="dark"] .structured-help-head { border-color: #303a35; }
html[data-theme="dark"] .structured-help-head > span,
html[data-theme="dark"] .structured-help-steps b { color: #a9ddce; background: #20332d; }
html[data-theme="dark"] .structured-help h3,
html[data-theme="dark"] .structured-help-steps strong { color: #e7eeea; }
html[data-theme="dark"] .structured-help p { color: #8f9b95; }
html[data-theme="dark"] .structured-help-note { border-color: #594b30; background: #282217; }
html[data-theme="dark"] .structured-help-note strong { color: #e2b55f; }
html[data-theme="dark"] .structured-help-note p { color: #c9bda7; }

/* Diagram generation */
.diagram-shell { display: grid; min-height: 100%; grid-template-columns: 258px minmax(620px, 1fr) 330px; color: #202735; background: #f6f7f9; }
.diagram-shell * { letter-spacing: 0; }
.diagram-menu { border-right: 1px solid #e4e7ec; background: #fff; }
.diagram-menu header { padding: 24px 18px 20px; border-bottom: 1px solid #eef0f4; }
.diagram-menu header h2 { margin: 0 0 3px; color: #18202d; font-size: 18px; }
.diagram-menu header p { margin: 0; color: #8993a4; font-size: 12px; }
.diagram-type-tabs { display: grid; gap: 4px; padding: 18px 12px; }
.diagram-type-tabs button { display: grid; min-height: 48px; grid-template-columns: 25px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: 6px; color: #5d6778; text-align: left; background: transparent; cursor: pointer; }
.diagram-type-tabs button > span { display: grid; width: 24px; height: 24px; place-items: center; color: #67748b; font-size: 12px; font-weight: 750; }
.diagram-type-tabs button b { overflow: hidden; font-size: 14px; font-weight: 560; text-overflow: ellipsis; white-space: nowrap; }
.diagram-type-tabs button small { color: #9aa3b1; font-size: 10px; white-space: nowrap; }
.diagram-type-tabs button:hover { background: #eef6f1; }
.diagram-type-tabs button.active { color: #fff; background: #1f8559; box-shadow: 0 6px 14px rgba(31, 133, 89, .18); }
.diagram-type-tabs button.active > span, .diagram-type-tabs button.active small { color: #fff; }
.diagram-workspace { min-width: 0; padding: 32px clamp(28px, 4vw, 64px) 54px; }
.diagram-notice { display: flex; max-width: 1040px; min-height: 52px; align-items: center; gap: 12px; margin: 0 auto; padding: 11px 16px; border: 1px solid #e5c98c; border-radius: 8px; color: #596172; background: #fbf8f1; }
.diagram-notice > span { color: #bd7c13; font-size: 19px; }
.diagram-notice p { margin: 0; font-size: 12px; line-height: 1.7; }
.diagram-notice strong { color: #a56a0b; }
.diagram-heading { max-width: 1040px; margin: 24px auto 0; padding: 0 0 22px; border-bottom: 1px solid #dfe3e9; text-align: center; }
.diagram-heading h2 { margin: 0 0 8px; color: #18202d; font-size: 27px; }
.diagram-heading p { margin: 0; color: #99a3b4; font-size: 13px; }
.diagram-input-tabs { display: flex; width: min(390px, 100%); margin: 32px auto 8px 0; padding: 4px; border-radius: 8px; background: #e9ecf2; }
.diagram-input-tabs button { min-height: 38px; flex: 1; padding: 0 10px; border: 0; border-radius: 6px; color: #7c8698; background: transparent; font-weight: 650; cursor: pointer; }
.diagram-input-tabs button.active { color: #176b47; background: #fff; box-shadow: 0 2px 7px rgba(26, 37, 62, .08); }
.diagram-field { display: grid; max-width: 1040px; gap: 9px; margin: 0 auto; }
.diagram-field > span { font-size: 14px; font-weight: 700; }
.diagram-field b { color: #d2564b; }
.diagram-field textarea { width: 100%; min-height: 310px; resize: vertical; padding: 16px; border: 1px solid #d8dee8; border-radius: 8px; color: #263044; background: #fff; font: 14px/1.8 Consolas, "Microsoft YaHei", monospace; outline: 0; overflow-wrap: anywhere; }
.diagram-field textarea:focus { border-color: #3a9068; box-shadow: 0 0 0 3px rgba(31, 133, 89, .10); }
.diagram-field > small { justify-self: end; color: #9aa3b2; font-size: 10px; }
.diagram-submit-bar { display: flex; max-width: 1040px; align-items: center; justify-content: center; gap: 18px; margin: 26px auto 0; padding-top: 26px; border-top: 1px solid #e5e8ed; }
.diagram-submit-bar p { max-width: 430px; margin: 0; color: #8993a3; font-size: 12px; line-height: 1.6; }
.diagram-submit-bar p.success { color: #267559; }
.diagram-submit-bar p.error { color: #b8453f; }
.diagram-submit-bar .send-button { min-width: 230px; min-height: 46px; justify-content: center; border: 0; background: #1f8559; }
.diagram-guide { margin: 32px 24px 32px 0; align-self: start; padding: 22px; border: 1px solid #e0e4eb; border-radius: 8px; background: #fff; box-shadow: 0 3px 9px rgba(27, 35, 51, .035); }
.diagram-guide > h3 { margin: 0; padding-bottom: 15px; border-bottom: 1px solid #e5e8ed; font-size: 15px; }
.diagram-guide ol { display: grid; gap: 21px; margin: 20px 0 0; padding: 0; list-style: none; }
.diagram-guide li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 9px; }
.diagram-guide li > span { display: grid; width: 28px; height: 25px; place-items: center; border-radius: 5px; color: #1f8559; background: #e5f3eb; font-size: 11px; font-weight: 750; }
.diagram-guide li strong { color: #344055; font-size: 13px; }
.diagram-guide li p, .diagram-guide > section p { margin: 7px 0 0; color: #9aa3b2; font-size: 12px; line-height: 1.65; }
.diagram-guide > section { margin-top: 22px; padding-top: 18px; border-top: 1px solid #e8ebf0; }
.diagram-guide > section strong { color: #596477; font-size: 12px; }
html[data-theme="dark"] .diagram-shell { color: #dce4df; background: #111513; }
html[data-theme="dark"] .diagram-menu, html[data-theme="dark"] .diagram-guide { border-color: #303934; background: #171c1a; }
html[data-theme="dark"] .diagram-menu header, html[data-theme="dark"] .diagram-heading, html[data-theme="dark"] .diagram-guide > h3, html[data-theme="dark"] .diagram-guide > section, html[data-theme="dark"] .diagram-submit-bar { border-color: #303934; }
html[data-theme="dark"] .diagram-heading h2, html[data-theme="dark"] .diagram-menu header h2 { color: #edf3f0; }
html[data-theme="dark"] .diagram-notice { border-color: #705c31; color: #c4bbb0; background: #262219; }
html[data-theme="dark"] .diagram-input-tabs { background: #222925; }
html[data-theme="dark"] .diagram-input-tabs button.active { color: #9ad5b5; background: #303936; }
html[data-theme="dark"] .diagram-field textarea { border-color: #38423d; color: #e1e8e4; background: #171c1a; }
@media (max-width: 1240px) { .diagram-shell { grid-template-columns: 226px minmax(0, 1fr); }.diagram-guide { grid-column: 2; margin: 0 28px 32px; }.diagram-workspace { padding-bottom: 32px; } }
@media (max-width: 780px) { .module-grid { grid-template-columns: 1fr; }.diagram-shell { display: block; }.diagram-menu { border-right: 0; border-bottom: 1px solid #e4e7ec; }.diagram-menu header { padding: 18px 16px 14px; }.diagram-type-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px; }.diagram-workspace { padding: 22px 16px 30px; }.diagram-guide { margin: 0 16px 30px; }.diagram-submit-bar { align-items: stretch; flex-direction: column; }.diagram-submit-bar .send-button { width: 100%; }.diagram-heading h2 { font-size: 24px; } }
@media (max-width: 460px) { .diagram-type-tabs { grid-template-columns: 1fr; }.diagram-input-tabs { width: 100%; }.diagram-input-tabs button { padding: 0 6px; font-size: 12px; }.diagram-field textarea { min-height: 260px; }.diagram-guide { padding: 18px; } }

/* Home product narrative */
.feature-story,.feature-proof,.feature-cta { width: min(1240px, calc(100% - 72px)); margin: 0 auto; }
.feature-eyebrow { display:block; margin-bottom:22px; color:#83c9b1; font:700 11px/1.2 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing:1.6px; }
.feature-story { padding:148px 0 128px; }.story-heading { max-width:600px; margin-bottom:64px; }.story-heading h2,.proof-head h2,.feature-cta h2 { margin:0; color:#16241d; font-size:clamp(34px,4vw,58px); line-height:1.12; font-weight:650; }.story-heading p { max-width:480px; margin:22px 0 0; color:#728179; font-size:16px; line-height:1.8; }
.story-layout { display:grid; grid-template-columns:minmax(0,1.08fr) minmax(330px,.92fr); align-items:center; gap:76px; }.story-visual { padding:20px; border:1px solid #d7e4de; border-radius:24px; color:#dcefe7; background:#0b211b; box-shadow:0 26px 65px #173b2c18; }.visual-topline { display:flex; align-items:center; gap:9px; color:#7ebda9; font:700 10px ui-monospace,monospace; letter-spacing:1px; }.live-dot { width:7px; height:7px; border-radius:50%; background:#80d2ae; box-shadow:0 0 0 5px #80d2ae22; animation:live-blink 2s infinite; }.visual-index { margin-left:auto; color:#6d9486; }.visual-window { margin-top:18px; overflow:hidden; border:1px solid #2c5748; border-radius:14px; background:#102c23; }.window-chrome { display:flex; align-items:center; gap:6px; padding:13px 15px; border-bottom:1px solid #2a5143; }.window-chrome span { width:7px; height:7px; border-radius:50%; background:#446b5b; }.window-chrome small { margin-left:8px; color:#709789; font:11px ui-monospace,monospace; }.visual-content { min-height:260px; padding:36px 34px; }.visual-command { color:#bdebd9; font:600 15px ui-monospace,monospace; }.visual-line { height:9px; margin-top:22px; border-radius:3px; background:#285846; animation:line-in 1s both; }.line-long { width:82%; }.line-mid { width:62%; animation-delay:.15s; }.line-short { width:44%; animation-delay:.3s; }.visual-chip-row { display:flex; flex-wrap:wrap; gap:9px; margin-top:44px; }.visual-chip-row b { padding:8px 11px; border:1px solid #4b806c; border-radius:5px; color:#9ad4c0; font-size:11px; font-weight:500; }.visual-caption { display:flex; align-items:baseline; gap:15px; padding:22px 4px 2px; }.visual-caption strong { color:#f0f8f3; font-size:20px; }.visual-caption span { color:#8caea0; font-size:13px; }.story-nav { display:grid; gap:4px; }.story-tab { position:relative; display:grid; grid-template-columns:42px 1fr 24px; grid-template-rows:auto auto; column-gap:14px; padding:22px 14px; border:0; border-bottom:1px solid #dfe8e3; color:#9aa9a1; background:transparent; text-align:left; cursor:pointer; transition:color .25s, padding .25s, border-color .25s; }.story-tab > span { grid-row:1 / span 2; color:#9cb1a7; font:700 11px ui-monospace,monospace; }.story-tab strong { color:#26382f; font-size:21px; font-weight:600; }.story-tab small { margin-top:7px; color:#87958e; font-size:13px; }.story-tab i { grid-column:3; grid-row:1 / span 2; align-self:center; color:#a9b6af; font-size:19px; font-style:normal; }.story-tab.active { padding-left:22px; border-bottom-color:#4b9a7d; }.story-tab.active strong,.story-tab.active > span,.story-tab.active i { color:#247a5c; }
.feature-proof { padding:110px 0 130px; border-top:1px solid #e2e9e5; }.proof-head { margin-bottom:54px; }.proof-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }.proof-grid article { min-height:220px; padding:28px; border:1px solid #dce6e1; border-radius:18px; background:#fff; }.proof-grid b { color:#318465; font:700 12px ui-monospace,monospace; }.proof-grid h3 { margin:38px 0 12px; color:#23352c; font-size:20px; }.proof-grid p { margin:0; color:#7a8981; font-size:14px; line-height:1.75; }.feature-cta { display:flex; align-items:end; justify-content:space-between; gap:30px; margin-bottom:80px; padding:58px 7%; border-radius:24px; background:#eaf5f0; }.feature-cta h2 { font-size:clamp(30px,3.7vw,49px); }.feature-cta p { margin:14px 0 0; color:#6f8178; font-size:15px; }.feature-cta .home-primary { margin:0; flex:none; }
@keyframes live-blink { 0%,100%{opacity:.5} 50%{opacity:1} } @keyframes line-in { from{transform:scaleX(0);transform-origin:left;opacity:0} to{transform:scaleX(1);opacity:1} }
html[data-theme="dark"] .story-heading h2,html[data-theme="dark"] .proof-head h2,html[data-theme="dark"] .feature-cta h2 { color:#edf5f0; } html[data-theme="dark"] .story-heading p,html[data-theme="dark"] .proof-grid p,html[data-theme="dark"] .feature-cta p { color:#9baa9f; } html[data-theme="dark"] .story-tab { border-color:#2c3932; } html[data-theme="dark"] .story-tab strong { color:#dbe9e1; } html[data-theme="dark"] .proof-grid article { border-color:#2e3c34; background:#171c1a; } html[data-theme="dark"] .proof-grid h3 { color:#e5efe9; } html[data-theme="dark"] .feature-proof { border-color:#2c3932; } html[data-theme="dark"] .feature-cta { background:#18352b; }
@media (max-width: 860px) { .feature-story,.feature-proof,.feature-cta { width:min(100% - 32px, 680px); }.story-layout { grid-template-columns:1fr; gap:40px; }.feature-story { padding:92px 0; }.proof-grid { grid-template-columns:1fr; }.feature-cta { align-items:flex-start; flex-direction:column; padding:42px 28px; } }
@media (max-width: 520px) { .visual-content { min-height:210px; padding:26px 20px; }.visual-caption { display:block; }.visual-caption span { display:block; margin-top:7px; }.story-tab strong { font-size:18px; } }

#home-panel { flex-direction:column; container-type:size; }
#home-panel.active { display:flex; }
#home-panel:not(.active) { display:none; }

/* Mac-terminal presentation for the delivery walkthrough. */
.story-visual { --terminal-accent:#80d2ae; color:#e8e8e8; background:#101010; border-color:#2d2d2d; box-shadow:0 26px 65px rgba(0,0,0,.16); }
.visual-topline { color:#a0a0a0; }
.live-dot { background:var(--terminal-accent); box-shadow:0 0 0 5px color-mix(in srgb, var(--terminal-accent) 20%, transparent); }
.visual-index { color:#888; }
.visual-window { border-color:#353535; background:#050505; }
.window-chrome { border-color:#2c2c2c; background:#171717; }
.window-chrome span:nth-child(1) { background:#ff5f57; }.window-chrome span:nth-child(2) { background:#febc2e; }.window-chrome span:nth-child(3) { background:#28c840; }
.window-chrome small { color:#858585; }
.visual-command { color:#f0f0f0; }
.visual-line { background:#3b3b3b; }
.visual-chip-row b { border-color:#555; color:#d0d0d0; background:#171717; }
.visual-caption strong { color:#f4f4f4; }.visual-caption span { color:#a0a0a0; }
html[data-theme="dark"] .story-visual { background:#090909; border-color:#2a2a2a; }
html[data-theme="dark"] .visual-window { background:#000; }

/* The product narrative uses a strict monochrome canvas in both themes. */
.home-view,.feature-story,.feature-proof,.feature-cta { opacity:0; transform:translateY(48px); transition:opacity .8s ease, transform .8s cubic-bezier(.22,.8,.24,1); }
.home-view.is-visible,.feature-story.is-visible,.feature-proof.is-visible,.feature-cta.is-visible { opacity:1; transform:none; }
.home-view.is-visible .home-intro { animation:feature-copy-in .65s cubic-bezier(.22,.8,.24,1) both; }
.home-view.is-visible .module-card { animation:feature-card-in .65s cubic-bezier(.22,.8,.24,1) both; }
.home-view.is-visible .module-card:nth-child(2) { animation-delay:.08s; }
.home-view.is-visible .module-card:nth-child(3) { animation-delay:.16s; }
.home-view.is-visible .module-card:nth-child(4) { animation-delay:.24s; }
.home-view.is-visible .module-card:nth-child(5) { animation-delay:.32s; }
.feature-proof.is-visible .proof-grid article { animation: feature-card-in .65s cubic-bezier(.22,.8,.24,1) both; }
.feature-proof.is-visible .proof-grid article:nth-child(2) { animation-delay:.12s; }
.feature-proof.is-visible .proof-grid article:nth-child(3) { animation-delay:.24s; }
@keyframes feature-copy-in { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:none; } }
@keyframes feature-card-in { from { opacity:0; transform:translateY(18px); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce) { .home-view,.feature-story,.feature-proof,.feature-cta,.home-view.is-visible .home-intro,.home-view.is-visible .module-card,.feature-proof.is-visible .proof-grid article { animation:none; transition:none; opacity:1; transform:none; } }
.feature-story,.feature-proof,.feature-cta { background:transparent; }
.feature-cta { border:1px solid #e1ebe5; }
html[data-theme="dark"] .feature-story,
html[data-theme="dark"] .feature-proof,
html[data-theme="dark"] .feature-cta { color:#f4f7f5; background:transparent; border-color:#262d2a; }
html[data-theme="dark"] .story-heading h2,
html[data-theme="dark"] .proof-head h2,
html[data-theme="dark"] .feature-cta h2 { color:#f4f7f5; }
html[data-theme="dark"] .story-heading p,
html[data-theme="dark"] .feature-cta p { color:#a2aaa5; }
html[data-theme="dark"] .proof-grid article { border-color:#2b322f; background:#000; }
html[data-theme="dark"] .feature-proof { border-color:#292f2d; }
html[data-theme="dark"] .feature-cta { background:#000; }
@media (max-width: 1220px) {
  .structured-layout { grid-template-columns: minmax(0, 1fr); }
  .structured-help { position: static; }
}

/* Agent sites reuse the primary site palette; only layout affordances stay scoped. */
html[data-agent-site="true"] .module-nav-account { flex-shrink:0; }
html[data-agent-site="true"] textarea { border-radius:8px; resize:none; }
html[data-agent-site="true"] .theme-toggle { display:grid !important; visibility:visible; opacity:1; }

/* Homepage uses the supplied bitmap icon set instead of text glyphs. */
.module-card-icon::before { content:none; }
.module-card-icon img { display:block; width:30px; height:30px; object-fit:contain; }

/* Client introduction and software showcase. */
.client-promo, .client-demo {
  --client-ink:#17231d;
  --client-copy:#53665c;
  --client-accent:#247b60;
  --client-rule:#ccdcd4;
}
.client-promo, .client-demo-layout {
  display:grid; width:min(1620px, calc(100% - 88px)); margin:0 auto;
  gap:clamp(32px,4vw,70px);
}
.client-promo {
  position:relative; flex:none; min-height:100%;
  grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr);
  align-items:center; padding:25px 0 18px;
}
.client-promo-copy { max-width:520px; min-width:0; }
.client-promo h1 { margin:0; color:var(--client-ink); font-size:54px; line-height:1.07; font-weight:660; }
.client-promo h1 em { color:var(--client-accent); font-style:normal; }
.client-promo-copy > p { margin:24px 0 0; color:var(--client-copy); font-size:15px; line-height:1.8; }
.client-download-actions { display:flex; flex-wrap:wrap; align-items:center; gap:14px 18px; margin-top:30px; }
.client-download-button { display:inline-flex; min-height:50px; align-items:center; gap:18px; padding:0 9px 0 20px; border-radius:999px; color:#fff; background:#267b60; font-size:14px; font-weight:700; text-decoration:none; box-shadow:0 12px 26px #267b602c; }
.client-download-button b { display:grid; width:34px; height:34px; place-items:center; border-radius:50%; color:#246f58; background:#f4faf7; font-size:18px; }
.client-download-button:hover { background:#1f684f; }
.client-download-button.is-disabled { color:#57665e; background:#e5ebe8; box-shadow:none; }
.client-download-button.is-disabled b { color:inherit; }
.client-download-meta { max-width:240px; color:var(--client-copy); font-size:13px; line-height:1.55; }
.client-promo-copy .client-update-note { margin-top:17px; font-size:13px; }
.client-scroll-next { position:absolute; bottom:25px; left:0; display:grid; width:36px; height:36px; place-items:center; color:var(--client-accent); font-size:23px; text-decoration:none; }
.client-scroll-next:hover { color:var(--client-ink); }

.client-showcase { min-width:0; }
.client-showcase-stage { height:clamp(240px, calc(100cqh - 158px), 756px); }
.client-showcase-stage figure { display:grid; height:100%; margin:0; grid-template-rows:minmax(0,1fr) auto; }
.client-showcase-stage figure[hidden] { display:none; }
.client-showcase-image {
  display:grid; grid-template:minmax(0,1fr) / minmax(0,1fr); place-items:center; min-height:0;
}
.client-showcase-image img { display:block; grid-area:1 / 1; width:auto; height:auto; max-width:100%; max-height:100%; }
.client-model canvas { grid-area:1 / 1; width:100%; height:100%; min-height:0; cursor:grab; }
.client-model canvas:active { cursor:grabbing; }
.client-showcase-stage figcaption { margin-top:16px; color:var(--client-copy); font-size:16px; text-align:center; }
.client-showcase-wheel { position:relative; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); min-height:102px; margin-top:8px; }
.client-showcase-wheel::before {
  position:absolute; top:-15px; right:0; left:0; height:59px;
  border-bottom:1px solid var(--client-rule); border-radius:0 0 50% 50% / 0 0 100% 100%; content:""; pointer-events:none;
}
.client-showcase-wheel button {
  position:relative; align-self:start; display:grid; justify-items:center; gap:8px; min-height:50px; margin-top:15px; padding:0 4px;
  border:0; color:var(--client-copy); background:transparent; font:inherit; font-size:18px; white-space:nowrap; cursor:pointer;
}
.client-showcase-wheel button:nth-child(2), .client-showcase-wheel button:nth-child(3) { margin-top:31px; }
.client-showcase-wheel button::before {
  width:17px; height:17px; margin-top:3px; border:2px solid var(--client-accent); border-radius:50%;
  background:var(--bg); content:"";
}
.client-showcase-wheel button[aria-pressed="true"] { color:var(--client-accent); font-weight:700; }
.client-showcase-wheel button[aria-pressed="true"]::before { background:var(--client-accent); box-shadow:0 0 0 4px color-mix(in srgb,var(--client-accent) 18%,transparent); }
.client-showcase-stage figure:nth-child(1) { --entry:-13%; --tilt:-9deg; }
.client-showcase-stage figure:nth-child(2) { --entry:-5%; --tilt:-4deg; }
.client-showcase-stage figure:nth-child(3) { --entry:5%; --tilt:4deg; }
.client-showcase-stage figure:nth-child(4) { --entry:13%; --tilt:9deg; }
@media (prefers-reduced-motion:no-preference) {
  .client-showcase.has-interacted figure:not([hidden]) .client-showcase-image { animation:showcase-swing-in .42s cubic-bezier(.22,.75,.25,1) both; }
}
@keyframes showcase-swing-in {
  from { opacity:.42; transform:translate(var(--entry),32px) rotate(var(--tilt)) scale(.79); }
  to { opacity:1; transform:none; }
}

.client-demo { width:100%; }
.client-demo-layout { width:min(1240px, calc(100% - 72px)); grid-template-columns:minmax(0,.75fr) minmax(0,1.25fr); align-items:center; padding:48px 0; }
.client-demo h2 { margin:0; color:var(--client-ink); font-size:32px; line-height:1.25; }
.client-demo h2 + p { max-width:26em; color:var(--client-copy); font-size:15px; line-height:1.8; }
.client-demo-link { display:inline-flex; min-height:44px; align-items:center; gap:7px; color:var(--client-accent); font-size:15px; font-weight:700; }
.client-demo video { display:block; width:100%; height:auto; aspect-ratio:16 / 9; border-radius:8px; background:#111; }

html[data-theme="dark"] :is(.client-promo, .client-demo) {
  --client-ink:#eef4f1;
  --client-copy:#b1bfb7;
  --client-accent:#91dbbb;
  --client-rule:#35473e;
}
html[data-theme="dark"] .client-download-button { color:#10231b; background:#88d4b7; }
html[data-theme="dark"] .client-download-button:hover { background:#a1e4c9; }
html[data-theme="dark"] .client-download-button.is-disabled { color:#aebcb4; background:#252c29; }
html[data-theme="dark"] .client-download-button.is-disabled b { color:#37473f; }
@media (max-width:860px) {
  .client-promo, .client-demo-layout { width:min(680px, calc(100% - 32px)); grid-template-columns:minmax(0,1fr); }
  .client-promo h1 { font-size:38px; }
  .client-showcase-stage { height:360px; }
  .client-showcase-wheel button { font-size:14px; }
  .client-scroll-next { position:static; }
}
@media (861px <= width <= 1270px) {
  .client-promo h1 { font-size:44px; }
}

/* Public site footer and legal information. */
.site-footer { width:100%; margin-top:0; border-top:1px solid #e0e9e4; color:#66766e; background:#fff; }
.site-footer-main { display:grid; width:min(1240px, calc(100% - 72px)); grid-template-columns:minmax(220px,1.35fr) repeat(3,minmax(130px,.8fr)) minmax(210px,1.2fr); gap:42px; margin:0 auto; padding:62px 0 54px; }
.footer-brand-title { display:flex; align-items:center; gap:11px; color:#1e2c24; font-size:20px; }
.footer-mark { width:36px; height:45px; object-fit:contain; }
.footer-brand p { max-width:290px; margin:22px 0 13px; color:#718078; font-size:13px; line-height:1.85; }
.footer-brand-note { color:#9aa8a1; font-size:11px; line-height:1.6; }
.footer-column { min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:13px; }
.footer-column h3 { margin:2px 0 7px; color:#87958e; font-size:12px; font-weight:700; letter-spacing:.04em; }
.footer-link { padding:0; border:0; color:#63766c; background:transparent; cursor:pointer; font:inherit; font-size:13px; line-height:1.45; text-align:left; transition:color .2s ease; }
.footer-link:hover { color:#217a5e; }
.footer-support p, .footer-notice p { margin:2px 0 0; color:#84928b; font-size:12px; line-height:1.75; }
.footer-notice { gap:10px; }
.footer-integrity { display:flex; width:min(1240px, calc(100% - 72px)); align-items:flex-start; gap:16px; margin:0 auto; padding:18px 0; border-top:1px solid #e8eeeb; border-bottom:1px solid #e8eeeb; color:#6d7d75; font-size:12px; line-height:1.7; }
.footer-integrity strong { flex:0 0 auto; color:#315f50; font-size:12px; }
.footer-integrity-link { flex:0 0 auto; padding:0; border:0; color:#277a60; background:transparent; cursor:pointer; font:inherit; font-size:12px; }
.footer-integrity-link:hover { text-decoration:underline; text-underline-offset:3px; }
.site-footer-bottom { display:flex; width:min(1240px, calc(100% - 72px)); flex-wrap:wrap; align-items:center; gap:9px 18px; margin:0 auto; padding:20px 0 28px; color:#a0aca6; font-size:11px; }
.site-footer-bottom a { color:#82978d; text-decoration:none; }
.site-footer-bottom a:hover { color:#277a60; text-decoration:underline; text-underline-offset:3px; }
body:not([data-client-mode="account"]) [data-client-account], body[data-client-mode="account"] [data-client-legacy] { display:none; }
.site-footer .site-icp { display:block; padding:0 16px 22px; text-align:center; color:inherit; font-size:12px; text-decoration:underline; }
.legal-dialog { width:min(760px, calc(100vw - 36px)); max-height:min(800px, calc(100vh - 36px)); display:flex; flex-direction:column; padding:0; overflow:hidden; }
.legal-dialog .dialog-head { flex:0 0 auto; padding:20px 24px 16px; border-bottom:1px solid #e3ebe7; }
.legal-dialog .dialog-head h2 { margin:7px 0 0; color:#213129; }
.legal-content { min-height:0; overflow:auto; padding:24px; color:#53645b; font-size:13px; line-height:1.85; }
.legal-content h3 { margin:0 0 12px; color:#213a2e; font-size:18px; }
.legal-content h4 { margin:22px 0 8px; color:#29483a; font-size:14px; }
.legal-content p { margin:0 0 14px; }
.legal-content ul, .legal-content ol { margin:0 0 18px; padding-left:1.4em; }
.legal-content li { margin:7px 0; }
.legal-content strong { color:#29483a; }
.legal-version { color:#87958e; font-size:11px; }
.legal-alert { padding:12px 14px; border-left:3px solid #4f927d; border-radius:4px; background:#f1f7f4; }
.contact-wechat {
  display:inline-block;
  margin:0 2px;
  padding:3px 10px;
  border:1px solid #bcd8cd;
  border-radius:6px;
  color:#1f6b55;
  background:#eef7f3;
  cursor:pointer;
  font:600 13px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace;
  letter-spacing:.02em;
  transition:border-color .18s ease, color .18s ease, background-color .18s ease;
}
.contact-wechat:hover { border-color:#7fb9a3; color:#175542; background:#e2f1ea; }
.contact-wechat.is-copied { border-color:#2d8b73; color:#fff; background:#2d8b73; }
html[data-theme="dark"] .contact-wechat { border-color:#3a5f51; color:#9ed7c6; background:#1a2723; }
html[data-theme="dark"] .contact-wechat:hover { border-color:#4d7d6b; color:#c6ebdd; background:#1f2f2a; }
.legal-dialog-foot { display:flex; flex:0 0 auto; align-items:center; justify-content:space-between; gap:14px; padding:14px 24px 18px; border-top:1px solid #e3ebe7; color:#8a9891; font-size:11px; line-height:1.5; }
html[data-theme="dark"] .site-footer { border-color:#292f2c; color:#a4b0aa; background:#101412; }
html[data-theme="dark"] .footer-brand-title { color:#e8efeb; }
html[data-theme="dark"] .footer-brand p, html[data-theme="dark"] .footer-support p, html[data-theme="dark"] .footer-notice p { color:#9aa69f; }
html[data-theme="dark"] .footer-brand-note, html[data-theme="dark"] .site-footer-bottom { color:#7f8d86; }
html[data-theme="dark"] .footer-link { color:#aab7b0; }
html[data-theme="dark"] .footer-link:hover, html[data-theme="dark"] .footer-integrity-link:hover, html[data-theme="dark"] .site-footer-bottom a:hover { color:#8ed1ba; }
html[data-theme="dark"] .footer-integrity { border-color:#292f2c; color:#9daaa3; }
html[data-theme="dark"] .footer-integrity strong { color:#9bd5bf; }
html[data-theme="dark"] .site-footer-bottom a { color:#87958e; }
html[data-theme="dark"] .legal-dialog .dialog-head, html[data-theme="dark"] .legal-dialog-foot { border-color:#303a35; }
html[data-theme="dark"] .legal-dialog .dialog-head h2, html[data-theme="dark"] .legal-content h3, html[data-theme="dark"] .legal-content h4, html[data-theme="dark"] .legal-content strong { color:#e8efeb; }
html[data-theme="dark"] .legal-content { color:#b4c0b9; }
html[data-theme="dark"] .legal-alert { border-color:#5c9d88; background:#1a2823; }
html[data-theme="dark"] .contact-wechat.is-copied { border-color:#2d8b73; color:#fff; background:#2d8b73; }
html[data-theme="dark"] .legal-dialog-foot { color:#8d9a93; }
html:not([data-theme="dark"]) .dialogue-guide-steps b { color: #2e6b59; background: #eaf3ef; }
html:not([data-theme="dark"]) .dialogue-guide-steps strong { color: #35443c; }
html:not([data-theme="dark"]) .dialogue-guide-steps span,
html:not([data-theme="dark"]) .dialogue-guide-note { color: #7f8c85; }
html:not([data-theme="dark"]) .dialogue-guide-note { border-color: #73aa99; background: #f2f8f5; }
html[data-theme="dark"] .dialogue-guide { border-color: #303a35; }
html[data-theme="dark"] .dialogue-guide-steps b { color: #a9ddce; background: #20332d; }
html[data-theme="dark"] .dialogue-guide-steps strong { color: #e7eeea; }
html[data-theme="dark"] .dialogue-guide-steps span,
html[data-theme="dark"] .dialogue-guide-note { color: #8f9b95; }
html[data-theme="dark"] .dialogue-guide-note { border-color: #65b49d; background: #171f1b; }
html:not([data-theme="dark"]) .reference-verification-option { color: #77857e; }
html:not([data-theme="dark"]) .reference-verification-toggle { color: #35443c; }
html:not([data-theme="dark"]) .reference-verification-track { border-color: #b9c8c1; background: #edf1ef; }
html:not([data-theme="dark"]) .reference-verification-track::after { background: #77857e; }
.composer-status { transition: color .2s ease; }
.composer:has(textarea:disabled) { cursor: default; }
.composer textarea:disabled { cursor: default; opacity: .72; }
.conversation-item:disabled, .conversation-delete:disabled,
#new-conversation:disabled, #rename-conversation:disabled { cursor: default; }
@media (max-width: 720px) {
  .composer-status { display: none; }
  .reference-verification-option { align-items: flex-start; flex-direction: column; gap: 4px; }
}
@media (max-width: 1100px) { .site-footer-main { grid-template-columns:1.4fr repeat(3, minmax(120px,.8fr)); }.footer-notice { grid-column:2 / -1; max-width:520px; } }
@media (max-width: 860px) { .site-footer-main,.footer-integrity,.site-footer-bottom { width:min(100% - 32px, 680px); }.site-footer-main { grid-template-columns:repeat(2,minmax(0,1fr)); gap:34px 28px; padding:48px 0 40px; }.footer-brand { grid-column:1 / -1; }.footer-notice { grid-column:1 / -1; max-width:none; }.footer-integrity { display:block; padding:16px 0; }.footer-integrity strong { display:block; margin-bottom:4px; }.footer-integrity-link { display:block; margin-top:7px; }.site-footer-bottom { padding:18px 0 24px; } }
.more-shell { min-height:100%; padding:34px clamp(18px,4vw,58px) 70px; background:#f6f8f7; color:#25312c; }
.more-heading { width:min(1280px,100%); margin:0 auto 24px; display:flex; justify-content:space-between; gap:28px; align-items:flex-start; }
.more-heading h2 { margin:5px 0; color:#17231d; font-size:30px; }
.more-heading p { margin:0; color:#77857e; }
.more-notice { min-width:260px; max-width:360px; padding:15px 18px; border:1px solid #d9e4dd; border-left:3px solid #2d8c68; background:#fff; }
.more-notice strong,.more-notice span { display:block; }.more-notice strong { color:#236e51; margin-bottom:6px; }.more-notice span { color:#75847c; font-size:12px; line-height:1.6; }
.more-grid { width:min(1280px,100%); margin:0 auto; display:grid; grid-template-columns:minmax(0,1.6fr) minmax(260px,.8fr); gap:20px; }
.more-tool { padding:26px 28px; border:1px solid #dce4e0; border-radius:8px; background:#fff; }.more-tool h3 { margin:0 0 8px; color:#17231d; }.more-tool p { margin:0 0 18px; color:#6e7d75; font-size:13px; }.more-tool textarea { width:100%; min-height:300px; border:1px solid #cfdad4; border-radius:7px; padding:14px; resize:vertical; box-shadow:none; }.more-tool textarea:focus { border-color:#2d8c68; box-shadow:0 0 0 3px rgba(45,140,104,.1); }.more-tool-link { align-self:start; }.more-tool-link .primary-button { margin-top:14px; }
html[data-theme="dark"] .more-shell { background:#111513; color:#dce4df; } html[data-theme="dark"] .more-heading h2 { color:#edf3f0; } html[data-theme="dark"] .more-notice, html[data-theme="dark"] .more-tool { border-color:#303934; background:#171c1a; } html[data-theme="dark"] .more-tool h3 { color:#edf3f0; } html[data-theme="dark"] .more-tool textarea { border-color:#38423d; background:#121715; color:#e1e8e4; }
@media (max-width:760px) { .more-heading,.more-grid { display:block; }.more-notice { margin-top:18px; }.more-tool { margin-bottom:16px; } }
/* Restore the three-column tools layout for the more-functions workspace. */
.more-workbench { display: grid; min-height: 100%; grid-template-columns: 240px minmax(0, 1fr) 300px; color: #202735; background: #f6f7f9; }
.more-menu { min-width: 0; border-right: 1px solid #e4e7ec; background: #fff; }
.more-menu header { padding: 24px 18px 20px; border-bottom: 1px solid #eef0f4; }
.more-menu h2 { margin: 0 0 3px; font-size: 18px; }
.more-menu p { margin: 0; color: #8993a4; font-size: 12px; }
.more-menu nav { display: grid; gap: 4px; padding: 18px 12px; }
.more-menu button { display: grid; min-height: 48px; grid-template-columns: 25px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: 6px; color: #5d6778; text-align: left; background: transparent; cursor: pointer; }
.more-menu button > span { display: grid; width: 24px; height: 24px; place-items: center; font-size: 12px; font-weight: 750; }
.more-menu button b { font-size: 14px; font-weight: 560; }
.more-menu button small { color: #9aa3b1; font-size: 10px; }
.more-menu button.active { color: #fff; background: #1f8559; box-shadow: 0 6px 14px rgba(31, 133, 89, .18); }
.more-menu button.active small { color: #fff; }
.more-workspace { min-width: 0; padding: 32px clamp(28px, 4vw, 64px) 54px; }
.more-workspace > section { width: min(900px, 100%); margin: 0 auto; }
.more-content-heading { margin: 0 auto 26px; padding: 18px 0 22px; border-bottom: 1px solid #dfe3e9; text-align: center; }
.more-content-heading h2 { margin: 0 0 8px; font-size: 27px; }
.more-content-heading p { margin: 0; color: #99a3b4; font-size: 13px; }
.more-guide { min-width: 0; margin-top: 0; }
.more-guide h3 { margin: 0 0 20px; font-size: 18px; }
.more-guide ol { display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; }
.more-guide li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
.more-guide li > span { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 50%; color: #1f8559; background: #e8f4ef; font-size: 11px; font-weight: 700; }
.more-guide li strong { display: block; margin: 2px 0 4px; font-size: 13px; }
.more-guide li p, .more-guide section p { margin: 0; color: #8993a4; font-size: 12px; line-height: 1.6; }
.more-guide > section { margin-top: 22px; padding: 18px; border: 1px solid #dfe5e1; border-left: 3px solid #1f8559; background: #fff; }
.more-guide > section strong { display: block; margin-bottom: 6px; }
.research-type-grid { display: grid; grid-template-columns: repeat(5, minmax(90px, 1fr)); gap: 8px; margin: 0 auto 24px; }
.research-type-grid button { min-height: 38px; padding: 7px 9px; border: 1px solid #d8dee8; border-radius: 6px; color: #586474; background: #fff; cursor: pointer; }
.research-type-grid button.active { border-color: #1f8559; color: #fff; background: #1f8559; }
.more-diagram-types { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin:0 auto 24px; padding:0; }
.more-diagram-types button { min-height:38px; padding:7px 9px; border:1px solid #d8dee8; border-radius:6px; color:#586474; background:#fff; cursor:pointer; font-size:13px; text-align:center; }
.more-diagram-types button:hover { border-color:#b9d8ca; color:#176b47; background:#f0f8f4; }
.more-diagram-types button.active { border-color:#1f8559; color:#fff; background:#1f8559; box-shadow:0 5px 12px rgba(31,133,89,.16); }
.more-workspace [data-more-content="diagram"] .diagram-notice { max-width:none; margin:0 0 22px; }
.more-workspace [data-more-content="diagram"] .diagram-input-tabs { margin-top:0; }
.more-workspace [data-more-content="diagram"] .diagram-field { max-width:none; }
.more-workspace [data-more-content="diagram"] .diagram-submit-bar { max-width:none; }
.more-workspace pre { max-width: 1040px; margin: 24px auto; padding: 18px; border: 1px solid #d8dee8; background: #fff; white-space: pre-wrap; }
html[data-theme="dark"] .more-workbench { color: #dce4df; background: #111513; }
html[data-theme="dark"] .more-menu, html[data-theme="dark"] .research-type-grid button, html[data-theme="dark"] .more-workspace pre, html[data-theme="dark"] .more-guide > section { border-color: #303934; background: #171c1a; color: #dce4df; }
html[data-theme="dark"] .more-menu button { color: #aab7b1; }
html[data-theme="dark"] .more-menu button.active { color: #fff; }
html[data-theme="dark"] .more-guide li p, html[data-theme="dark"] .more-guide section p { color: #8f9b95; }
@media (max-width: 1240px) { .more-workbench { grid-template-columns: 220px minmax(0, 1fr); } .more-guide { grid-column: 2; margin: 0 28px 32px; } }
@media (max-width: 780px) { .more-workbench { display: block; } .more-menu { border-right: 0; border-bottom: 1px solid #e4e7ec; } .more-menu nav { grid-template-columns: repeat(2, minmax(0, 1fr)); } .more-workspace { padding: 22px 16px 30px; } .more-workspace > section { width: 100%; } .more-guide { margin: 0 16px 30px; } .research-type-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 780px) { .more-diagram-types { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width: 460px) { .research-type-grid,.more-diagram-types { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Dialogue workbench: wider, readable side panels with pointer-resizable columns. */
.app-shell[data-layout="dialogue"] { --dialogue-sidebar-width: 378px; --dialogue-context-width: 305px; grid-template-columns: var(--dialogue-sidebar-width) minmax(0, 1fr) var(--dialogue-context-width); }
.app-shell[data-layout="dialogue"] .sidebar, .app-shell[data-layout="dialogue"] .context-bar { position: relative; }
.app-shell[data-layout="dialogue"] .sidebar, .app-shell[data-layout="dialogue"] .context-bar { cursor: default; }
.app-shell[data-layout="dialogue"] .sidebar::after, .app-shell[data-layout="dialogue"] .context-bar::before { position: absolute; z-index: 3; top: 0; bottom: 0; width: 8px; content: ""; }
.app-shell[data-layout="dialogue"] .sidebar::after, .app-shell[data-layout="dialogue"] .context-bar::before { cursor: ew-resize; background: transparent; }
.app-shell[data-layout="dialogue"] .sidebar::after { right: -4px; }
.app-shell[data-layout="dialogue"] .context-bar::before { left: -4px; }
body.is-resizing-panels { cursor: ew-resize; user-select: none; }
.app-shell[data-layout="dialogue"] .chat-scroll { font-size: 16px; }
.app-shell[data-layout="dialogue"] .message.assistant .message-content, .app-shell[data-layout="dialogue"] .message.user .message-content { font-size: 16px; line-height: 1.78; }
.app-shell[data-layout="dialogue"] .message-worklog-entry { font-size: 16px; line-height: 1.78; }
.app-shell[data-layout="dialogue"] .message-run-status { font-size: 14px; line-height: 1.5; }
.app-shell[data-layout="dialogue"] .empty-state h2 { font-size: 30px; }
.app-shell[data-layout="dialogue"] .empty-state p { font-size: 15px; }
.app-shell[data-layout="dialogue"] .composer textarea { font-size: 16px; line-height: 1.7; }
.app-shell[data-layout="dialogue"] .dialogue-guide-steps { gap: 16px; }
.app-shell[data-layout="dialogue"] .dialogue-guide-steps strong { font-size: 14px; }
.app-shell[data-layout="dialogue"] .dialogue-guide-steps span, .app-shell[data-layout="dialogue"] .dialogue-guide-note { font-size: 13px; line-height: 1.7; }
.app-shell[data-layout="dialogue"] .context-bar { overflow-x: hidden; overflow-y: auto; scrollbar-gutter: stable; }
.app-shell[data-layout="dialogue"] .dialogue-guide { flex: 0 0 auto; overflow: visible; }
.app-shell[data-layout="dialogue"] .dialogue-guide .context-heading { color: var(--text); font-size: 15px; }
.dialogue-pricing { flex: 0 0 auto; padding-top: 11px !important; padding-bottom: 11px !important; }
.dialogue-pricing .context-heading { margin-bottom: 7px; }
.pricing-live { color: #2d8b73; font-size: 11px; font-weight: 500; }
.dialogue-pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dialogue-pricing-grid > div { padding: 7px 9px; border: 1px solid #dce8e2; border-radius: 8px; background: #f4f8f6; }
.dialogue-pricing-grid span, .dialogue-pricing-grid strong { display: block; }
.dialogue-pricing-grid span { color: #78877f; font-size: 12px; }
.dialogue-pricing-grid strong { margin-top: 3px; color: #216d58; font-size: 15px; }
.dialogue-pricing-note { margin: 6px 0 0; color: #7f8c85; font-size: 10px; line-height: 1.4; }
html[data-theme="dark"] .dialogue-pricing-grid > div { border-color: #303a35; background: #171f1b; }
html[data-theme="dark"] .dialogue-pricing-grid strong { color: #a9ddce; }
html[data-theme="dark"] .dialogue-pricing-note { color: #8f9b95; }
.formatting-shell { width: 100%; max-width: none; margin: 0; padding: 30px clamp(24px, 3.3vw, 64px) 72px; }
.formatting-heading { width: 100%; margin: 0 0 28px; }
.formatting-heading h2 { margin: 5px 0 6px; font-size: 30px; }
.formatting-layout { position: relative; display: block; width: 100%; margin: 0; }
.formatting-main { width: min(790px, 100%); max-width: none; margin: 0 auto; gap: 18px; }
.formatting-aside { position: absolute; top: 0; right: 0; width: 288px; gap: 14px; }
.formatting-card, .formatting-aside > section, .formatting-submit-bar { border-radius: 8px; box-shadow: 0 6px 18px rgba(30, 66, 49, .045); }
.formatting-card { padding: 20px; }
.formatting-card-head { margin: -20px -20px 18px; padding: 15px 20px; border-bottom: 1px solid #e5ebe8; border-radius: 8px 8px 0 0; background: #fbfcfb; }
.formatting-card-head h3 { margin-bottom: 5px; font-size: 16px; }
.formatting-card-head p { font-size: 13px; }
.formatting-dropzone { min-height: 190px; }
.formatting-submit-bar { padding: 18px 20px; }
.formatting-aside > section { padding: 18px; }
.formatting-aside h3 { margin-bottom: 16px; font-size: 16px; }
.formatting-aside ol { gap: 18px; }
.formatting-aside li p, .formatting-tip p { line-height: 1.7; }
.formatting-search.survey-field { gap: 8px; }
.formatting-search.survey-field input { height: 44px; padding: 0 14px; border-radius: 6px; }
html[data-theme="dark"] .formatting-card-head { border-color: #303a35; background: #1b211e; }
@media (max-width: 1500px) { .formatting-layout { display: grid; grid-template-columns: minmax(0, 1fr) 288px; gap: 22px; width: min(1100px, 100%); margin: 0 auto; } .formatting-main { width: 100%; } .formatting-aside { position: sticky; top: 20px; width: auto; } }
@media (max-width: 1200px) { .app-shell[data-layout="dialogue"] { --dialogue-sidebar-width: 320px; --dialogue-context-width: 305px; } }
@media (max-width: 900px) { .formatting-layout { grid-template-columns: 1fr; } .formatting-aside { position: static; grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .app-shell[data-layout="dialogue"] { display: block; } .app-shell[data-layout="dialogue"] .sidebar, .app-shell[data-layout="dialogue"] .context-bar { cursor: default; } .app-shell[data-layout="dialogue"] .sidebar::after, .app-shell[data-layout="dialogue"] .context-bar::before { display: none; } .formatting-shell { width: 100%; padding-left: 16px; padding-right: 16px; } .formatting-heading, .formatting-layout { width: 100%; } }

/* Familiar Windows-style file tiles, shared by queued and sent attachments. */
.message-file-icon {
  position: relative;
  display: block;
  width: 40px;
  height: 44px;
  flex: 0 0 40px;
  border-radius: 0;
  color: #fff;
  background: transparent;
}
.file-icon-page {
  position: absolute;
  top: 1px;
  right: 2px;
  width: 29px;
  height: 38px;
  border: 1px solid #cfd7d4;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(35, 52, 45, .12);
}
.file-icon-page::before {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 10px;
  height: 10px;
  border-left: 1px solid #cfd7d4;
  border-bottom: 1px solid #cfd7d4;
  background: #edf1ef;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  content: "";
}
.file-icon-page::after {
  position: absolute;
  right: 4px;
  bottom: 6px;
  width: 12px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 -5px currentColor, 0 -10px currentColor;
  content: "";
  opacity: .18;
}
.file-icon-badge {
  position: absolute;
  top: 15px;
  left: 0;
  display: grid;
  min-width: 23px;
  height: 21px;
  padding: 0 4px;
  place-items: center;
  border-radius: 3px;
  color: #fff;
  background: #68756f;
  box-shadow: 0 1px 2px rgba(21, 36, 30, .2);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}
.file-icon-word { color: #185abd; }
.file-icon-word .file-icon-badge { background: #185abd; }
.file-icon-sheet { color: #107c41; }
.file-icon-sheet .file-icon-badge { background: #107c41; }
.file-icon-pdf { color: #d13438; }
.file-icon-pdf .file-icon-badge { background: #d13438; font-size: 8px; }
.file-icon-slides { color: #c43e1c; }
.file-icon-slides .file-icon-badge { background: #c43e1c; }
.file-icon-image { color: #167d9a; }
.file-icon-image .file-icon-badge { background: #167d9a; font-size: 8px; }
.file-icon-archive { color: #9a6b12; }
.file-icon-archive .file-icon-badge { background: #9a6b12; font-size: 8px; }
.file-icon-text { color: #536b7a; }
.file-icon-text .file-icon-badge, .file-icon-generic .file-icon-badge { background: #536b7a; font-size: 8px; }
.file-icon-code { color: #59636e; }
.file-icon-code .file-icon-badge { background: #59636e; font-size: 8px; }

.attachment-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 360px));
  gap: 8px;
}
.attachment-chip.attachment-file-card {
  display: grid;
  min-width: 0;
  min-height: 62px;
  grid-template-columns: 40px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  border: 1px solid #dfe7e3;
  border-radius: 8px;
  color: #354139;
  background: #fff;
  box-shadow: 0 3px 10px rgba(33, 61, 49, .04);
}
.attachment-file-copy { min-width: 0; }
.attachment-file-copy strong, .attachment-file-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-file-copy strong { color: #2d3933; font-size: 12px; font-weight: 600; }
.attachment-file-copy small { margin-top: 4px; color: #849089; font-size: 10px; }
.attachment-chip .attachment-file-remove {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 4px;
  color: #7e8a84;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  transition: color .18s ease, background-color .18s ease, transform .18s ease;
}
.attachment-chip .attachment-file-remove:hover { color: #b33b36; background: #fcefed; }
.attachment-chip .attachment-file-remove:active { transform: scale(.94); }
.attachment-chip .attachment-file-remove:focus-visible { outline: 2px solid #4a9c84; outline-offset: 2px; }
html[data-theme="dark"] .attachment-chip.attachment-file-card { border-color: #334039; color: #d6dfda; background: #181e1b; }
html[data-theme="dark"] .attachment-file-copy strong { color: #e5ece8; }
html[data-theme="dark"] .attachment-file-copy small { color: #849089; }
html[data-theme="dark"] .attachment-chip .attachment-file-remove { color: #9ca8a2; }
html[data-theme="dark"] .attachment-chip .attachment-file-remove:hover { color: #f0aaa4; background: #352321; }
html[data-theme="dark"] .message-file-icon { border-radius: 0; background: transparent; }
.files-list .message-file-card { grid-template-columns: 36px minmax(0, 1fr) 18px; }
.files-list .message-file-icon { width: 34px; height: 38px; flex-basis: 34px; }
.files-list .file-icon-page { width: 26px; height: 34px; }
.files-list .file-icon-badge { top: 13px; min-width: 20px; height: 18px; padding: 0 3px; font-size: 9px; }
.files-list .file-icon-pdf .file-icon-badge,
.files-list .file-icon-image .file-icon-badge,
.files-list .file-icon-archive .file-icon-badge,
.files-list .file-icon-text .file-icon-badge,
.files-list .file-icon-generic .file-icon-badge,
.files-list .file-icon-code .file-icon-badge { font-size: 7px; }
@media (max-width: 680px) {
  .attachment-list { grid-template-columns: minmax(0, 1fr); }
}

/* One shared support group for the homepage and module instructions. */
.support-group { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line-soft); color: var(--text); }
.support-group .support-group-copy > strong { display: block; font-size: 15px; line-height: 1.5; color: var(--text); }
.support-group .support-group-copy > p { margin: 8px 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.support-group .support-group-copy > small { color: var(--muted); font-size: 12px; }
.support-group .support-group-image { display: block; width: min(180px, 100%); margin-top: 16px; padding: 10px; border: 1px solid var(--line-soft); border-radius: 8px; background: #fff; text-decoration: none; }
.support-group .support-group-image img { display: block; width: 100%; height: auto; max-height: 280px; object-fit: contain; }
.support-group .support-group-reward { margin: 10px 0 0; color: #2b8065; font-size: 13px; font-weight: 750; line-height: 1.5; text-align: center; }

/* Match the questionnaire sidebar's existing cards, including its dark theme. */
.survey-aside > .support-group { min-width: 0; margin-top: 0; }
.survey-aside .support-group .support-group-copy > strong { margin-bottom: 13px; color: #29372f; }
.survey-aside .support-group .support-group-copy > p { margin: 0; color: #7d8982; font-size: 12px; line-height: 1.75; }
.survey-aside .support-group .support-group-copy > small { display: block; margin-top: 10px; font-size: 11px; line-height: 1.6; }
.survey-aside .support-group .support-group-image { margin: 16px auto 0; }
html[data-theme="dark"] .survey-aside .support-group .support-group-copy > strong { color: #e4ebe7; }
@media (min-width: 621px) and (max-width: 900px) {
  .survey-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.support-group-client { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.support-group-client .support-group-copy { min-width: 0; }
.support-group-client .support-group-image { flex: 0 0 136px; width: 136px; margin: 0; }
.support-group.hidden, .support-group .hidden { display: none; }
@media (max-width: 480px) {
  .support-group-client { gap: 16px; }
  .support-group-client .support-group-image { flex-basis: 112px; width: 112px; }
}

.support-group-mobile { display: none; }
@media (max-width: 1080px) {
  .support-group-mobile { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; margin: 12px 16px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 8px; }
  .support-group-mobile .support-group-image { flex: 0 0 96px; width: 96px; margin: 0; padding: 6px; }
  .support-group-mobile.hidden { display: none; }
}

/* Completed dialogue tasks stay marked until the conversation is opened explicitly. */
.conversation-item.has-unread-completion { position: relative; padding-left: 25px; }
.conversation-unread-dot { position: absolute; left: 8px; top: 50%; width: 7px; height: 7px; border-radius: 50%; background: #3b82f6; transform: translateY(-50%); }
/* Recharge uses one centered content width from heading to history. */
#balance-panel .page-heading,
#balance-panel .billing-mode-notice,
#balance-panel .balance-announcement,
#balance-panel .wallet-summary,
#balance-panel .billing-layout { width: min(960px, calc(100% - 40px)); margin-left: auto; margin-right: auto; }
#balance-panel .page-heading { padding-left: 0; padding-right: 0; }
#balance-panel .wallet-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#balance-panel .wallet-summary > div { border: 1px solid var(--line-soft); border-radius: 16px; }
#balance-panel .billing-layout { grid-template-columns: minmax(0, 1fr); padding: 0 0 40px; }
#balance-panel .billing-section { padding: 24px; border-radius: 20px; }
#balance-panel .payment-options { gap: 12px; margin: 18px 0 24px; }
#balance-panel .payment-option { min-height: 78px; padding: 16px 18px; border-radius: 12px; transition: border-color .15s, background .15s; }
#balance-panel .payment-option strong { font-size: 22px; font-variant-numeric: tabular-nums; }
#balance-panel .payment-option small { font-size: 13px; font-weight: 500; }
#balance-panel .payment-option > span { font-size: 14px; }
#balance-panel .payment-option:focus-visible { outline: 2px solid #238466; outline-offset: 3px; }
.payment-progress { padding: 20px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--panel-2); }
.payment-progress-heading { display: flex; align-items: center; gap: 12px; }
.payment-state-mark { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; background: #e2ebe6; color: #56695f; }
.payment-state-mark::before { content: '¥'; font-size: 22px; font-weight: 650; }
.payment-progress-heading strong { display: block; margin-top: 4px; font-size: 17px; font-variant-numeric: tabular-nums; }
.payment-caption, .payment-credit > span { color: var(--muted); font-size: 12px; }
.payment-credit { margin-left: auto; text-align: right; }
.payment-progress .payment-status { margin: 14px 0 0; min-height: 0; font-size: 13px; }
.payment-progress .payment-qr-link { display: flex; align-items: center; justify-content: space-between; gap: 18px; width: max-content; max-width: 100%; margin: 16px 0 0; padding: 11px 16px; border-radius: 8px; color: #fff; background: #167456; font-size: 13px; font-weight: 600; text-decoration: none; }
.payment-progress .payment-qr-link:hover { background: #105c44; }
.payment-progress[data-status='paid'] .payment-state-mark { background: #dcf3e5; color: #177345; }
.payment-progress[data-status='paid'] .payment-state-mark::before { content: '✓'; }
.payment-progress[data-status='paid'] #yirenfu-payment-state { color: #187444; }
.payment-progress[data-status='expired'] .payment-state-mark { background: #fce8e8; color: #b63232; }
.payment-progress[data-status='expired'] .payment-state-mark::before { content: '!'; }
.payment-progress[data-status='expired'] #yirenfu-payment-state { color: #b63232; }
.payment-progress[data-status='pending'] .payment-state-mark { background: #fff0d5; color: #98631b; }
.payment-history-heading { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
.payment-history-heading > span { color: var(--muted); font-size: 12px; }
#payment-list { max-height: none; overflow: visible; }
#payment-list .data-row { min-height: 66px; padding: 12px 0; }
#payment-list .data-row strong { font-size: 14px; }
#payment-list .data-row span { font-size: 12px; }
#payment-list .payment-badge { padding: 5px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
#payment-list .payment-badge-paid { color: #176b40; background: #e4f5eb; }
#payment-list .payment-badge-expired { color: #b43131; background: #fceaea; }
#payment-list .payment-badge-pending { color: #916019; background: #fff2d9; }
.payment-pagination { display: flex; align-items: center; justify-content: center; gap: 20px; padding-top: 20px; }
.payment-pagination > span { color: var(--muted); font-size: 12px; }
.payment-pagination button:disabled { opacity: .4; cursor: default; }
.payment-confirm-dialog { box-sizing: border-box; width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 28px; border: 1px solid #dce6df; border-radius: 20px; background: #fff; color: #22372d; box-shadow: 0 24px 90px #15261c30; }
.payment-confirm-dialog::backdrop { background: #15261c66; backdrop-filter: blur(4px); }
.payment-confirm-dialog header { display: flex; align-items: center; justify-content: space-between; }
.payment-confirm-dialog h2 { margin: 20px 0 10px; font-size: 24px; }
.payment-confirm-dialog p { color: #6c7b71; font-size: 13px; line-height: 1.7; }
.payment-confirm-summary { display: flex; justify-content: space-between; gap: 16px; margin: 24px 0 16px; padding: 20px; border-radius: 12px; background: #f1f7f3; }
.payment-confirm-summary > div:last-child { text-align: right; }
.payment-confirm-summary span, .payment-confirm-summary strong { display: block; }
.payment-confirm-summary span { font-size: 12px; color: #63786a; }
.payment-confirm-summary strong { margin-top: 8px; font-size: 24px; color: #176f51; }
.payment-confirm-dialog .payment-confirm-account { overflow-wrap: anywhere; }
.payment-confirm-actions { display: flex; gap: 12px; margin-top: 24px; }
.payment-confirm-actions button { flex: 1; min-height: 44px; justify-content: center; }
html[data-theme='dark'] .payment-confirm-dialog { background: #18231e; color: #e1eae4; border-color: #37473d; }
html[data-theme='dark'] .payment-confirm-dialog p { color: #a5b7ab; }
html[data-theme='dark'] .payment-confirm-summary { background: #22382b; }
html[data-theme='dark'] .payment-confirm-summary strong { color: #9ad8b4; }
html[data-theme='dark'] .payment-confirm-summary span { color: #b0c4b6; }
html[data-theme='dark'] .payment-progress[data-status='paid'] #yirenfu-payment-state { color: #80d4a1; }
html[data-theme='dark'] .payment-progress[data-status='expired'] #yirenfu-payment-state { color: #ff9999; }
@media (max-width: 600px) {
  #balance-panel .billing-section { padding: 18px; }
  #balance-panel .wallet-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #balance-panel .wallet-summary > div:first-child { grid-column: 1 / -1; }
  #balance-panel .wallet-summary > div { padding: 14px 10px; }
  #balance-panel .wallet-summary strong { font-size: 16px; }
  #balance-panel .payment-option { padding: 14px 12px; }
  #balance-panel .payment-option strong { font-size: 20px; }
  .payment-progress { padding: 16px; }
  .payment-progress-heading { flex-wrap: wrap; }
  .payment-progress-heading strong { font-size: 15px; }
}
