:root { font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; color: #17202a; background: #f3f6f8; }
* { box-sizing: border-box; }
body { margin: 0; }
.skip-link { position: fixed; z-index: 100; top: 8px; left: 8px; padding: 9px 13px; border-radius: 9px; background: var(--brand, #176b78); color: #fff; font-weight: 750; text-decoration: none; transform: translateY(-180%); transition: transform .16s ease; }
.skip-link:focus { transform: translateY(0); outline: 3px solid #82bdd1; outline-offset: 2px; }
.global-busy-indicator { position: fixed; z-index: 90; right: 18px; bottom: 18px; display: inline-flex; align-items: center; gap: 9px; max-width: calc(100vw - 36px); padding: 10px 13px; border: 1px solid #cfe5e1; border-radius: 999px; background: rgba(247,255,253,.96); color: #155b61; box-shadow: 0 10px 24px rgba(32,70,80,.16); font-size: .86rem; font-weight: 700; }
.global-busy-spinner { width: 15px; height: 15px; flex: 0 0 auto; border: 2px solid #bcded8; border-top-color: #176b78; border-radius: 50%; animation: busy-spin .8s linear infinite; }
@keyframes busy-spin { to { transform: rotate(360deg); } }
.shell { width: min(960px, calc(100% - 32px)); margin: 0 auto; padding: 42px 0 72px; }
.top-nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px; margin: -28px 0 22px; background: rgba(255, 255, 255, .96); border: 1px solid #dce4e8; border-radius: 8px; box-shadow: 0 6px 18px rgba(37, 56, 69, .08); }
.brand { white-space: nowrap; color: #173241; }
.nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.nav-links a { color: #253842; text-decoration: none; border-radius: 7px; padding: 7px 9px; font-weight: 700; font-size: .92rem; }
.nav-links a:hover, .nav-links a:focus-visible { background: #e8eef1; outline: none; }
.nav-links a.active { background: #125d7b; color: #fff; }
[hidden], .hidden { display: none !important; }
.hero { padding: 8px 4px 24px; }
.eyebrow { letter-spacing: .08em; font-size: .82rem; font-weight: 700; color: #536878; margin: 0 0 8px; }
h1 { line-height: 1.26; margin: 0; font-size: clamp(1.8rem, 4vw, 2.7rem); max-width: 16em; }
.subhead, .muted { color: #5f6f7c; line-height: 1.6; }
.panel, .message, .route-card { background: #fff; border: 1px solid #dce4e8; border-radius: 8px; box-shadow: 0 8px 24px rgba(37, 56, 69, .07); }
.panel { padding: 22px; margin: 18px 0; }
.module-info { border-left: 4px solid #125d7b; background: #fbfdfe; }
.api-config-panel { border-left: 4px solid #8a6a2d; background: #fffdf7; }
.api-config-panel h2 { margin-top: 0; color: #5f481d; }
.api-config-panel label { display: block; margin: 10px 0 6px; font-weight: 700; }
.api-config-panel input, .api-config-panel select { width: 100%; }
.api-config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.api-config-status { margin-top: 12px; padding: 10px; border-radius: 8px; background: #f8f4e8; color: #5f481d; }
.api-config-status.ok { background: #eef8f1; color: #276347; }
.paper-workflow-hero { border-left-color: #255f85; background: #f8fbfc; }
.paper-workflow-hero h3 { margin: 14px 0 6px; font-size: 1rem; color: #173241; }
.paper-workflow-hero .list-block strong { color: #173241; }
.ppt-workflow-hero { border-left-color: #2d6f55; background: #f8fcfa; }
.ppt-workflow-hero h3 { margin: 14px 0 6px; font-size: 1rem; color: #173b2c; }
.ppt-page-workspace { border-left: 4px solid #2d6f55; background: #fbfffc; }
.ppt-page-workspace h2 { margin-top: 0; color: #173b2c; }
.ppt-generation-workflow { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 9px; margin: 14px 0; }
.ppt-workflow-step { display: grid; gap: 4px; border: 1px solid #d9e9df; border-radius: 8px; padding: 11px; background: #f7fcf9; }
.ppt-workflow-step strong { color: #276347; }
.ppt-workflow-step span { color: #5f6f7c; font-size: .92rem; line-height: 1.5; }
.ppt-entry-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.ppt-entry-choice { display: grid; gap: 7px; min-height: 150px; padding: 18px; text-align: left; border: 1px solid #d6e6e4; border-radius: 16px; background: #fbfefd; color: #1f4e57; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease; }
.ppt-entry-choice:hover, .ppt-entry-choice:focus-visible { border-color: #187b78; background: #eaf7f4; box-shadow: 0 10px 22px rgba(24, 123, 120, .12); transform: translateY(-2px); outline: none; }
.ppt-entry-choice-icon { font-size: 1.6rem; color: #8b6a32; }
.ppt-entry-choice span:last-child { color: #62757d; line-height: 1.55; font-size: .92rem; }
.ppt-source-back { margin-bottom: 12px; }
.ppt-entry-actions { margin-top: 16px; }
.ppt-deck-upload-panel, .ppt-deck-export-guide { margin-top: 16px; padding: 18px; border: 1px solid #d9e9df; border-radius: 14px; background: #fff; }
.ppt-deck-upload-panel h3 { margin-top: 0; color: #173b2c; }
.ppt-deck-upload-panel input[type="file"] { width: 100%; padding: 12px; border: 1px dashed #9db9b1; border-radius: 10px; background: #f7fcf9; }
.ppt-deck-export-guide { border-left: 4px solid #8b6a32; background: #fffdf7; color: #5f481d; }
.ppt-deck-export-guide ol { margin: 10px 0 0; padding-left: 1.35rem; line-height: 1.7; }
.finance-assistant-workspace { border-left: 5px solid #176b78; background: #fbfffe; }
.finance-assistant-header h2 { margin: 12px 0 6px; color: #173b4a; }
.finance-assistant-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.finance-assistant-tab { display: grid; gap: 6px; min-height: 112px; padding: 14px; text-align: left; border: 1px solid #d5e6e5; border-radius: 14px; background: #fff; color: #204b55; cursor: pointer; }
.finance-assistant-tab:hover, .finance-assistant-tab.active { border-color: #176b78; background: #eaf7f4; box-shadow: 0 8px 18px rgba(23,107,120,.1); }
.finance-assistant-tab span { font-size: .88rem; line-height: 1.5; }
.finance-assistant-content { padding: 20px; border: 1px solid #d9e9e5; border-radius: 16px; background: rgba(255,255,255,.86); }
.finance-assistant-content h3 { margin-top: 0; color: #173b4a; }
.finance-assistant-content textarea, .finance-assistant-content input[type="text"], .finance-assistant-content input[type="file"] { width: 100%; }
.finance-assistant-content label { display: block; margin: 11px 0 6px; font-weight: 700; }
.finance-assistant-result, .finance-procedure-results, .finance-attachment-result, .finance-adjustment-result { margin-top: 16px; }
.finance-result-section { margin-top: 12px; padding: 12px 14px; border: 1px solid #e0eceb; border-radius: 12px; background: #fbfefd; }
.finance-topic-summary { margin-top: 14px; padding: 16px 18px; border: 1px solid #cfe6de; border-left: 4px solid #187b70; border-radius: 14px; background: linear-gradient(135deg, #f1faf6, #fbfefd); }
.finance-topic-summary h4 { margin: 0 0 8px; color: #145d55; }
.finance-topic-summary ul { margin: 0; padding-left: 1.25rem; line-height: 1.65; }
.finance-topic-caution { margin: 10px 0 0; padding-top: 9px; border-top: 1px solid #dcece5; color: #76551e; line-height: 1.55; }
.finance-chat { display: grid; grid-template-rows: minmax(360px, 1fr) auto; min-height: 620px; overflow: hidden; border: 1px solid #dce9e8; border-radius: 20px; background: #f8fbfb; box-shadow: 0 16px 42px rgba(30, 71, 78, .07); }
.finance-chat-history { display: flex; flex-direction: column; gap: 22px; max-height: min(68vh, 780px); min-height: 360px; overflow-y: auto; padding: clamp(18px, 4vw, 42px); scroll-behavior: smooth; }
.finance-chat-welcome { width: min(100%, 760px); margin: auto; padding: clamp(24px, 4vw, 44px); border: 1px solid #dcebe6; border-radius: 22px; background: radial-gradient(circle at 95% 8%, rgba(213, 240, 229, .72), transparent 36%), #fff; box-shadow: 0 10px 30px rgba(25, 79, 77, .05); }
.finance-chat-eyebrow { color: #16766d; font-size: .9rem; font-weight: 750; letter-spacing: .04em; }
.finance-chat-welcome h3 { margin: 10px 0 8px; color: #183b46; font-size: clamp(1.35rem, 2.4vw, 1.85rem); }
.finance-chat-welcome > p { margin: 0; color: #607783; line-height: 1.7; }
.finance-chat-prompts { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.finance-chat-prompt { padding: 9px 13px; border: 1px solid #d7e7e4; border-radius: 999px; background: #fff; color: #285b60; cursor: pointer; font: inherit; transition: transform .16s ease, border-color .16s ease, background .16s ease; }
.finance-chat-prompt:hover { transform: translateY(-1px); border-color: #69b8a4; background: #eff9f5; }
.finance-chat-turn { display: grid; gap: 14px; width: min(100%, 920px); margin-inline: auto; }
.finance-chat-user { display: flex; justify-content: flex-end; align-items: flex-start; gap: 10px; }
.finance-chat-user > p { max-width: min(80%, 720px); margin: 0; padding: 13px 17px; border: 1px solid #d4e8e2; border-radius: 18px 18px 5px 18px; background: #e9f6f1; color: #203f46; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.finance-chat-assistant { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: start; gap: 10px; }
.finance-chat-avatar { display: grid; flex: 0 0 32px; width: 32px; height: 32px; place-items: center; border-radius: 50%; background: #e5efee; color: #42646a; font-size: .78rem; font-weight: 700; }
.finance-chat-avatar.assistant { background: #19796f; color: white; }
.finance-chat-answer { min-width: 0; padding: 18px 20px; border: 1px solid #e3ecea; border-radius: 5px 18px 18px 18px; background: #fff; color: #344f59; line-height: 1.7; box-shadow: 0 5px 18px rgba(31, 64, 70, .04); }
.finance-chat-answer > :first-child { margin-top: 0; }
.finance-chat-answer > :last-child { margin-bottom: 0; }
.finance-chat-answer h4 { margin: 8px 0; color: #155c55; }
.finance-chat-answer ul { margin: 8px 0 12px; padding-left: 1.3rem; }
.finance-chat-lead { color: #294b55; }
.finance-chat-caution { margin: 12px 0; padding: 10px 12px; border-radius: 10px; background: #fff8e9; color: #76551e; }
.finance-chat-followup { margin-top: 14px; padding: 12px 14px; border-left: 3px solid #80b7c5; border-radius: 0 10px 10px 0; background: #f2f8fa; }
.finance-chat-followup strong { color: #315b66; }
.finance-chat-followup p { margin: 5px 0 0; }
.finance-chat-procedures { display: grid; gap: 10px; margin-top: 14px; padding: 13px 14px; border: 1px solid #d7e9e2; border-radius: 13px; background: #f3faf6; }
.finance-chat-procedures > strong { color: #246357; }
.finance-chat-procedure h4 { margin: 5px 0; color: #225d56; }
.finance-chat-procedure p { margin: 5px 0; }
.finance-chat-procedure ol { margin: 8px 0; padding-left: 1.4rem; }
.finance-chat-procedure li { margin: 5px 0; }
.finance-guided-questions { display: grid; gap: 13px; margin-top: 15px; padding: 14px; border: 1px solid #dce9e6; border-radius: 13px; background: #f8fbfa; }
.finance-guided-questions > strong { color: #245a59; }
.finance-guided-group > p { margin: 0 0 8px; color: #405c65; font-weight: 650; }
.finance-guided-options { display: flex; flex-wrap: wrap; gap: 8px; }
.finance-guided-option { padding: 8px 12px; border: 1px solid #d5e3e2; border-radius: 999px; background: #fff; color: #48616a; font: inherit; cursor: pointer; transition: all .14s ease; }
.finance-guided-option:hover { border-color: #56a695; color: #176d64; }
.finance-guided-option.selected { border-color: #18796f; background: #e4f4ee; color: #145d55; box-shadow: inset 0 0 0 1px #18796f; }
.finance-guided-submit { justify-self: start; padding: 9px 14px; border: 0; border-radius: 10px; background: #18796f; color: white; font: inherit; font-weight: 700; cursor: pointer; }
.finance-guided-submit:disabled { opacity: .45; cursor: not-allowed; }
.finance-chat-sources { margin-top: 15px; border-top: 1px solid #edf1f0; padding-top: 12px; }
.finance-chat-sources summary { color: #246b67; cursor: pointer; font-weight: 700; }
.finance-chat-source-note { margin-top: 13px; color: #768991; font-size: .88rem; }
.finance-chat-composer { position: sticky; bottom: 0; z-index: 1; padding: 14px clamp(14px, 3vw, 28px) 16px; border-top: 1px solid #e1ebea; background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); }
.finance-chat-composer textarea { display: block; width: min(100%, 920px); min-height: 78px; margin: 0 auto; resize: vertical; border: 1px solid #d6e5e3; border-radius: 14px; padding: 13px 15px; background: #fbfdfd; color: #24404a; font: inherit; line-height: 1.55; }
.finance-chat-composer textarea:focus { border-color: #3d9a89; outline: 3px solid rgba(61, 154, 137, .12); }
.finance-chat-composer-footer { display: flex; width: min(100%, 920px); align-items: center; justify-content: space-between; gap: 12px; margin: 9px auto 0; }
.finance-chat-composer-footer > span { font-size: .82rem; }
.finance-chat-controls { display: flex; align-items: center; gap: 9px; }
.finance-chat-composer-footer button { min-width: 112px; padding: 10px 16px; border: 0; border-radius: 11px; background: #16796f; color: white; font: inherit; font-weight: 700; cursor: pointer; }
.finance-chat-composer-footer .finance-chat-clear { min-width: auto; background: transparent; color: #617780; }
.finance-chat-composer-footer .finance-chat-clear:hover { background: #f0f5f4; color: #295a5e; }
.finance-chat-composer-footer button:disabled { opacity: .58; cursor: wait; }
.finance-result-section ul { margin: 8px 0 0; padding-left: 1.3rem; line-height: 1.65; }
.finance-evidence, .finance-report { margin-top: 12px; padding: 10px 12px; border: 1px solid #e0e8e8; border-radius: 10px; background: #fff; }
.finance-evidence summary, .finance-report summary { cursor: pointer; font-weight: 700; color: #176b78; }
.finance-evidence-item { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #dbe7e5; }
.finance-policy-matches { margin-top: 16px; }
.finance-policy-matches > h4 { margin: 0 0 6px; color: #173b4a; }
.finance-policy-match { display: grid; gap: 7px; margin-top: 10px; padding: 13px 15px; border: 1px solid #d9e9e5; border-radius: 12px; background: #f9fdfb; }
.finance-policy-match strong { color: #234c57; line-height: 1.5; }
.finance-policy-excerpt { margin: 0; color: #304d57; line-height: 1.7; overflow-wrap: anywhere; }
.finance-policy-match small { line-height: 1.5; }
.finance-policy-match .text-link { width: fit-content; }
.finance-procedure-card { margin-top: 12px; padding: 14px; border: 1px solid #d9e9df; border-radius: 12px; background: #fbfffc; }
.finance-procedure-card h4 { margin: 0 0 6px; color: #276347; }
.finance-procedure-card ol { margin: 8px 0 0; padding-left: 1.3rem; line-height: 1.6; }
.finance-attachment-result, .finance-adjustment-result { padding: 12px; border-radius: 10px; background: #f7fbfd; }
.finance-assistant-disclaimer { margin: 16px 0 0; color: #6b5a37; }
body.finance-page-mode #conversation, body.finance-page-mode .controls { display: none; }
.ppt-generation-brief { margin-top: 16px; border: 1px solid #d9e9df; border-radius: 8px; padding: 14px; background: #fff; }
.ppt-generation-brief h3 { margin: 0 0 6px; color: #173b2c; }
.ppt-generation-brief label { display: block; margin: 10px 0 6px; font-weight: 700; }
.ppt-generation-brief input, .ppt-generation-brief textarea, .ppt-generation-brief select { width: 100%; }
.ppt-brief-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ppt-brief-output { margin-top: 12px; }
.office-workflow-hero { border-left-color: #77653d; background: #fffdf8; }
.office-workflow-hero h3 { margin: 14px 0 6px; font-size: 1rem; color: #4c3e20; }
.info-only-panel { border-left: 4px solid #9aadb8; }
.controls label { display: block; margin: 14px 0 7px; font-weight: 700; }
.controls.paper-one-screen-mode label[for="projectSelect"],
.controls.paper-one-screen-mode #projectSelect,
.controls.paper-one-screen-mode #projectHint { display: none; }
.paper-one-screen-fields { margin-top: 8px; }
.paper-one-screen-fields textarea { min-height: 88px; }
.paper-one-screen-status { margin: 10px 0 0; }
.paper-one-screen-result h2, .paper-prompt-result h2 { margin-bottom: 8px; }
.paper-primary-revision-goal { font-size: 1.12rem; font-weight: 700; color: #173241; background: #eef6f8; border-radius: 8px; padding: 10px 12px; }
.paper-direction-options { display: flex; flex-wrap: wrap; gap: 8px; }
.text-link-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
select, textarea, input[type="text"] { width: 100%; border: 1px solid #b9c7d0; border-radius: 9px; padding: 11px; font: inherit; background: #fff; }
textarea { resize: vertical; min-height: 120px; }
.paper-long-text-input { min-height: 220px; max-height: 46vh; overflow: auto; line-height: 1.58; white-space: pre-wrap; }
.paper-length-hint { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: #fff8e5; color: #6b4f20; }
.paper-one-screen-running { border-left: 4px solid #477e94; background: #f7fbfd; }
.paper-one-screen-running h2 { margin-top: 0; }
.paper-prompt-module { margin-top: 18px; padding: 18px; border: 1px solid #d8cbe9; border-left: 5px solid #896ab5; border-radius: 14px; background: linear-gradient(135deg, #fcf9ff, #f7f2fd); }
.paper-prompt-module h3 { margin: 10px 0 7px; color: #4c3c69; font-size: 1.16rem; }
.paper-prompt-module .text-link-actions { align-items: center; }
.paper-prompt-module .muted { color: #6f6680; }
.paper-prompt-one-screen, .paper-prompt-result { border-left: 5px solid #896ab5; background: linear-gradient(135deg, #fcf9ff, #f8f5fd); }
.paper-revision-comparison { margin: 14px 0; border: 1px solid #dce7eb; border-radius: 12px; background: #fbfdfe; overflow: hidden; }
.paper-diff-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #e3ecef; color: #60747d; font-size: .88rem; }
.paper-diff-delete-legend, .paper-diff-insert-legend { padding: 3px 7px; border-radius: 5px; font-weight: 700; }
.paper-diff-delete-legend { color: #9a4242; background: #fdeaea; text-decoration: line-through; }
.paper-diff-insert-legend { color: #28704d; background: #e7f7ed; }
.paper-diff-toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 12px 0; }
.paper-diff-toolbar button { padding: 7px 11px; font-size: .88rem; }
.paper-diff-toolbar button.secondary { color: #315460; }
.paper-diff-toolbar button.active { background: #176b78; color: #fff; }
.paper-diff-highlighted { margin: 10px 12px 12px; padding: 14px; border: 1px solid #e0e9ec; border-radius: 9px; background: #fff; white-space: pre-wrap; line-height: 1.8; word-break: break-word; }
.paper-diff-highlighted del { color: #9a4242; background: #fdeaea; text-decoration-thickness: 2px; }
.paper-diff-highlighted ins { color: #28704d; background: #e7f7ed; text-decoration: none; border-bottom: 2px solid #76bd91; }
.paper-diff-side-by-side { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 10px 12px 12px; }
.paper-diff-column { min-width: 0; }
.paper-diff-column h4 { margin: 0 0 7px; color: #315460; }
.paper-diff-column .prompt-preview { max-height: 360px; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
button { border: 0; border-radius: 9px; padding: 10px 16px; font: inherit; font-weight: 700; cursor: pointer; background: #125d7b; color: #fff; transition: background .16s ease, transform .16s ease, box-shadow .16s ease; }
button.secondary { background: #e8eef1; color: #253842; }
button:hover:not(:disabled), .download-link:hover { background: #0e4e68; box-shadow: 0 4px 12px rgba(18, 93, 123, .18); }
button:focus-visible, .download-link:focus-visible, textarea:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid #82bdd1; outline-offset: 2px; }
button:focus-visible, .download-link:focus-visible, a:focus-visible, summary:focus-visible { position: relative; z-index: 2; }
button:disabled { background: #e7ecef; color: #7a858c; cursor: not-allowed; box-shadow: none; }
button.mini { padding: 5px 9px; margin-left: 6px; font-size: .86rem; }
button.selected { background: #0f5f78; color: #fff; border-color: #0f5f78; }
.p3-revision-priority-card ol { margin: 0; padding-left: 1.4rem; }
.p3-revision-priority-card li { margin: 6px 0; }
.capability-list, .card-grid { display: grid; gap: 10px; }
.card-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.capability { border-left: 4px solid #9aadb8; background: #f7fafb; padding: 10px 12px; border-radius: 7px; }
.capability strong { display: block; }
.capability small { color: #5f6f7c; }
.mini-card { border: 1px solid #dce4e8; background: #f9fbfc; border-radius: 8px; padding: 13px; }
.mini-card strong, .mini-card span { display: block; }
.mini-card span { margin-top: 5px; color: #125d7b; font-weight: 700; }
.summary-box { line-height: 1.6; }
.conversation { display: grid; gap: 14px; margin-top: 24px; padding-bottom: 42vh; }
.message { padding: 14px 16px; max-width: 83%; line-height: 1.6; }
.message p { margin: 0; white-space: pre-wrap; }
.message.user { justify-self: end; background: #e5f0f4; border-color: #c8dde6; }
.message.assistant { justify-self: start; }
.route-card { padding: 18px; line-height: 1.62; }
.route-header { display: flex; align-items: center; gap: 8px; }
.pill { display: inline-flex; align-items: center; width: auto; min-height: 24px; border-radius: 999px; background: #e7f3ec; color: #276347; padding: 3px 10px; font-size: .82rem; font-weight: 700; }
.status-pill { background: #e6f1f5; color: #125d7b; }
.route-meta { display: grid; grid-template-columns: max-content 1fr; gap: 5px 13px; padding: 10px 0; margin: 0; }
.route-meta dt { font-weight: 700; color: #42545f; }
.route-meta dd { margin: 0; }
.recommendation { border-top: 1px solid #e3ebef; padding: 10px 0; }
.detail-card { border: 1px solid #e3ebef; border-radius: 8px; padding: 12px; margin: 10px 0; background: #fbfdfe; }
.starter-guide { border-color: #cddfe7; background: #f7fbfd; }
.starter-guide[data-role="starter-guide"] { border-left: 4px solid #255f85; }
.home-recommendation-card { border-left: 4px solid #125d7b; background: #fbfdfe; }
.starter-guide h2 { margin: 0 0 8px; font-size: 1.18rem; }
.starter-guide-quiet { opacity: .62; }
.example-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ppt-file-selector { border-left: 4px solid #2d6f55; background: #fbfffc; }
.office-handoff-card { border-left: 4px solid #77653d; background: #fffdf8; }
.office-handoff-card h2 { margin-top: 8px; }
.office-open-guide { background: #fff; border-color: #e0d5bb; }
.office-direction-actions button { min-width: 150px; }
.ppt-drop-zone { border: 2px dashed #a9c8b9; border-radius: 8px; padding: 18px; background: #f7fcf9; cursor: pointer; margin: 10px 0; }
.ppt-drop-zone:hover, .ppt-drop-zone:focus-visible, .ppt-drop-zone.drag-over { border-color: #2d6f55; background: #eff8f2; outline: none; }
.ppt-advanced-options { margin-top: 10px; border: 1px solid #dce4e8; border-radius: 8px; padding: 9px 11px; background: #fff; }
.ppt-advanced-options summary { cursor: pointer; font-weight: 700; color: #2d6f55; }
.p3-current-call-info { border-left: 4px solid #477e94; background: #f8fcfd; }
.input_request_card { border-left: 4px solid #b8892e; background: #fffaf0; }
.execution_plan_card { border-left: 4px solid #477e94; background: #f7fbfd; }
.confirmation_card { border-left: 4px solid #896ab5; background: #fbf8ff; }
.native-confirmation-card { border: 2px solid #896ab5; background: #fbf8ff; }
.execution_result_card { border-left: 4px solid #287b4e; background: #f8fff9; }
.p3-result-card .result-card:first-child { border-color: #cfe3d5; background: #fbfffc; }
.p3-operation-trail { border-left: 4px solid #9aadb8; background: #fafcfd; }
.p3-card-inactive { opacity: .72; box-shadow: none; }
.p3-card-inactive .detail-card { background: #f7f9fa; }
.history-note { border-top: 1px dashed #c8d4da; padding-top: 8px; margin-top: 10px; }
.p3-slot-input textarea { min-height: 150px; line-height: 1.55; }
.expandable-result { margin-top: 10px; border: 1px solid #dce4e8; border-radius: 8px; background: #fff; padding: 8px 10px; }
.expandable-result summary { cursor: pointer; font-weight: 700; color: #125d7b; }
.download-link.used { background: #e8eef1; color: #253842; pointer-events: none; }
.detail-card h3 { margin: 0 0 8px; font-size: 1rem; }
.detail-card h4 { margin: 10px 0 5px; font-size: .94rem; color: #42545f; }
.detail-card ul { margin: 0; padding-left: 1.2rem; }
.list-block { margin-top: 8px; }
.plan-card { border-color: #d9e8d9; background: #fbfffb; }
.next-step { background: #f4f8fa; border-radius: 8px; padding: 11px; margin: 8px 0; }
.safety { color: #6b4f20; background: #fff8e5; border-radius: 8px; padding: 10px; margin: 8px 0; }
.error { color: #8a1f1f; background: #fff0f0; border: 1px solid #efc5c5; border-radius: 10px; padding: 12px; }
.error::before { content: "未执行任何操作："; font-weight: 700; }
.error-advice-title { display: block; margin-top: 8px; color: #6f2525; }
.error-next-step { margin: 5px 0 0; color: #7b3c3c; }
.paper-diagnosis-panel label, .paper-prompt-panel label, .ppt-reconstruction-panel label, .model-assist-panel label, .model-provider-panel label, .local-runtime-panel label, .sdu-conversation-panel label { display: block; margin: 10px 0 6px; font-weight: 700; }
.confirmation-card, .result-card { border: 1px solid #dce4e8; border-radius: 8px; padding: 12px; margin-top: 12px; background: #fff; }
.confirm-line { display: flex !important; gap: 8px; align-items: flex-start; font-weight: 400 !important; }
.confirm-line input { width: auto; margin-top: 4px; }
.download-link { display: inline-block; margin-top: 10px; background: #125d7b; color: #fff; text-decoration: none; border-radius: 9px; padding: 10px 14px; font-weight: 700; }
.prompt-preview { white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; background: #f4f8fa; border: 1px solid #dce4e8; border-radius: 8px; padding: 10px; max-height: 420px; overflow: auto; }
@media (max-width: 560px) { .shell { width: min(100% - 20px, 960px); padding-top: 22px; } .panel { padding: 16px; } .message { max-width: 94%; } }

/* v2 workspace presentation: compact wizard pages instead of one long workbench */
:root { --ink: #172b3a; --muted-ink: #6a7b88; --brand: #176b78; --brand-dark: #104955; --line: #dce7eb; --soft: #f4f8f9; --warm: #fbf6e9; }
body { min-height: 100vh; color: var(--ink); background: radial-gradient(circle at 8% 0%, rgba(220,244,239,.95) 0, transparent 30%), radial-gradient(circle at 96% 12%, rgba(255,239,211,.72) 0, transparent 24%), linear-gradient(135deg, #f8fbfc 0%, #edf5f4 100%); font-family: "Segoe UI", "Microsoft YaHei", sans-serif; }
.shell { width: min(1180px, calc(100% - 40px)); padding: 24px 0 54px; }
.top-nav { margin: 0 0 28px; padding: 12px 16px; border: 1px solid rgba(220,231,235,.9); border-radius: 16px; box-shadow: 0 12px 30px rgba(32,70,80,.08); backdrop-filter: blur(10px); }
.brand { color: var(--brand-dark); letter-spacing: .01em; }
.nav-links { gap: 5px; }
.nav-links a { border-radius: 10px; padding: 8px 11px; color: #42616b; transition: .18s ease; }
.nav-links a.active { background: var(--brand); box-shadow: 0 5px 14px rgba(23,107,120,.2); }
.hero { position: relative; overflow: hidden; min-height: 238px; padding: 30px 34px 32px; border: 1px solid rgba(211,229,230,.92); border-radius: 24px; background: linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.93) 39%, rgba(255,255,255,.42) 72%, rgba(255,255,255,.10) 100%), url("/static/assets/research-hero.png") right center / cover no-repeat; box-shadow: 0 16px 36px rgba(32,70,80,.08); }
.hero > * { position: relative; z-index: 1; }
.hero h1 { color: #122c3a; letter-spacing: -.025em; font-size: clamp(2.15rem, 4.2vw, 3.35rem); line-height: 1.18; }
.subhead { max-width: 760px; margin-top: 12px; font-size: 1.1rem; line-height: 1.75; color: #56717a; }
.wizard-bar { display: grid; grid-template-columns: 110px 1fr 110px; align-items: center; gap: 16px; padding: 14px 16px; margin: 4px 0 18px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.88); box-shadow: 0 10px 26px rgba(32,70,80,.07); }
.wizard-progress { display: grid; gap: 2px; text-align: center; }
.wizard-step-label { color: var(--brand); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.wizard-progress strong { font-size: 1.05rem; }
.wizard-page-hint { color: var(--muted-ink); font-size: .88rem; }
.wizard-nav-button { min-width: 100px; padding: 9px 13px; }
.wizard-nav-button:disabled { opacity: .55; }
.panel, .message, .route-card { border-color: rgba(220,231,235,.95); border-radius: 16px; box-shadow: 0 14px 34px rgba(32,70,80,.07); }
.panel { padding: 24px; margin: 16px 0; }
.module-info { border-left-width: 5px; }
.api-config-panel { background: linear-gradient(135deg, rgba(255,253,247,.98), rgba(255,255,255,.96)); border-left-width: 5px; }
.api-config-panel h2 { font-size: 1.4rem; }
.api-config-grid { gap: 16px; }
.api-config-status { border: 1px solid #eadfbf; border-radius: 10px; }
.api-config-section { margin-top: 20px; padding: 20px; border: 1px solid #e6dfca; border-radius: 16px; background: rgba(255,255,255,.68); }
.api-config-section h3 { margin-top: 0; color: #254b56; font-size: 1.28rem; }
.api-chat-section { border-left: 5px solid #176b78; }
.api-image-section { border-left: 5px solid #8b6a32; background: rgba(255,253,247,.7); }
.api-provider-reference, .api-provider-warning { margin-top: 14px; padding: 12px 14px; border-radius: 12px; }
.api-provider-reference { border: 1px solid #d9e9e2; background: #f5fbf8; color: #285b51; }
.api-provider-warning { border: 1px solid #eadfbf; background: #fffaf0; color: #725526; }
.api-provider-reference p, .api-provider-warning p { margin: 5px 0 0; }
.api-custom-model { margin-top: 10px; }
.ppt-image-generation-panel { margin-top: 18px; padding: 18px; border: 1px solid #d9e9e2; border-radius: 16px; background: linear-gradient(135deg, #fbfffd, #f5fbfa); }
.ppt-image-generation-panel h3 { margin-top: 0; color: #225963; }
.ppt-generated-output { margin-top: 14px; }
.ppt-generated-preview { display: grid; gap: 9px; padding: 12px; border: 1px solid #d5e6e3; border-radius: 13px; background: #fff; }
.ppt-generated-preview img { display: block; width: 100%; max-height: 560px; object-fit: contain; border-radius: 9px; background: #eef4f4; }
.ppt-generated-preview p { margin: 0; }
.api-config-overall-note { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: #f3f8f8; color: #315460; }
.api-config-overall-note p { margin-bottom: 0; }
.materials-preparation-card > select { margin: 8px 0 18px; min-height: 44px; }
.alloymind-form { margin-top: 18px; padding: 16px; border: 1px solid #d7e7e2; border-radius: 14px; background: linear-gradient(135deg, #fbfffd, #f6fbfa); }
.alloymind-form input, .alloymind-form select { width: 100%; margin-bottom: 10px; }
.alloymind-form label { display: block; margin: 9px 0 5px; font-weight: 700; color: #285360; }
.alloymind-form .api-config-status { margin-top: 14px; }
.alloymind-result { margin-top: 16px; }
.alloymind-result h3 { margin-bottom: 6px; color: #1f5e62; }
.result-callout { padding: 10px 12px; border-left: 4px solid #3b8b77; border-radius: 8px; background: #eef8f4; color: #24584d; }
.alloymind-insight-card { border-left: 5px solid #6e8b64; }
.alloymind-evidence-row { display: grid; gap: 3px; padding: 12px 14px; margin: 8px 0; border-radius: 10px; background: #f5f8f3; border: 1px solid #dbe8da; }
.materials-workbench { margin-top: 8px; }
.materials-workbench-header { padding: 4px 2px 18px; }
.materials-workbench-header h2 { margin: 4px 0 6px; color: #174f59; font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
.materials-quickstart { display: grid; gap: 4px; margin: 0 0 16px; padding: 12px 14px; border: 1px solid #cfe8df; border-radius: 12px; background: linear-gradient(135deg, #f2fbf7, #fbfffd); }
.materials-quickstart strong { color: #1f5e62; }
.materials-quickstart span { font-size: .9rem; line-height: 1.5; }
.materials-context-panel, .materials-analysis-catalog, .materials-analysis-panel, .materials-result-board { padding: 16px; border: 1px solid #dbe9e7; border-radius: 16px; background: rgba(255,255,255,.82); box-shadow: 0 8px 22px rgba(32,70,80,.035); }
.materials-context-panel h3, .materials-analysis-catalog h3, .materials-analysis-panel h3, .materials-result-board h3 { margin-top: 0; color: #225963; }
.materials-context-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.materials-context-grid label { display: grid; gap: 6px; font-weight: 700; color: #315b61; }
.materials-context-grid input { width: 100%; }
.materials-context-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.materials-context-actions span { margin-left: 4px; }
.materials-history-board { margin-top: 16px; padding-top: 14px; border-top: 1px solid #e2eeec; }
.materials-history-fold { margin-top: 24px; padding: 16px 18px; border: 1px solid #dceae8; border-radius: 14px; background: #f8fbfa; }
.materials-history-fold > summary { color: #244d5d; font-weight: 700; cursor: pointer; }
.materials-history-fold[open] > summary { margin-bottom: 12px; }
.materials-result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.materials-sdu-output { margin-top: 12px; }
.materials-interpret-consent { display: flex; align-items: flex-start; gap: 8px; margin: 12px 0; padding: 12px; border-left: 3px solid #147a78; background: #f0f8f6; }
.materials-interpret-preview { margin: 10px 0; }
.materials-interpret-preview > summary { cursor: pointer; color: #315e55; font-weight: 600; }
.materials-interpret-preview pre { max-height: 260px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.materials-history-board h4 { margin: 0 0 10px; color: #315e55; }
.materials-history-item { display: grid; gap: 3px; padding: 10px 12px; margin: 8px 0; border: 1px solid #e0ecea; border-radius: 10px; background: #fbfefd; }
.materials-history-item p { margin: 3px 0 0; }
.materials-workbench-layout { display: grid; grid-template-columns: minmax(220px, .34fr) minmax(0, .66fr); gap: 18px; margin-top: 18px; }
.materials-analysis-catalog { display: grid; align-content: start; gap: 10px; }
.materials-analysis-choice { display: grid; gap: 4px; width: 100%; text-align: left; padding: 13px 14px; border: 1px solid #d6e6e4; border-radius: 12px; background: #fbfefd; color: #1f4e57; }
.materials-analysis-choice:hover, .materials-analysis-choice.active { border-color: #187b78; background: #eaf7f4; box-shadow: 0 6px 14px rgba(24,123,120,.12); }
.materials-analysis-choice span { font-size: .9rem; }
.materials-choice-meta { color: #5f7b80; font-size: .76rem; line-height: 1.45; }
.materials-result-board { margin-top: 18px; }
.materials-result-grid { display: grid; grid-template-columns: 1fr; gap: 16px; margin: 12px 0 16px; }
.materials-result-card { padding: 13px; border-radius: 12px; background: #f5faf8; border: 1px solid #d8eae5; }
.materials-result-card, .materials-result-grid, .materials-chart-workspace, .materials-plot-wrap { min-width: 0; max-width: 100%; }
.materials-result-card p { margin: 7px 0; }
.materials-analysis-settings { margin: 12px 0; padding: 10px 12px; border: 1px solid #e2ece8; border-radius: 10px; background: #f8fbfa; }
.materials-analysis-settings summary { cursor: pointer; color: #315e55; font-weight: 650; }
.materials-analysis-settings label { display: block; margin: 10px 0 5px; color: #45636a; font-weight: 650; }
.materials-analysis-settings input, .materials-analysis-settings select { width: 100%; margin-bottom: 8px; }
.materials-chart-workspace { margin-top: 14px; padding: 16px; border: 1px solid #d7e7e2; border-radius: 14px; background: #fff; }
.materials-chart-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.materials-chart-heading h4 { margin: 0; color: #20545c; font-size: 1.06rem; }
.materials-chart-heading span { font-size: .84rem; }
.materials-chart-controls { margin: 12px 0; padding: 10px 12px; border: 1px solid #e2ece8; border-radius: 10px; background: #f8fbfa; }
.materials-chart-controls summary { cursor: pointer; color: #315e55; font-weight: 650; }
.materials-chart-control-grid { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)); gap: 10px; margin-top: 12px; }
.materials-chart-control-grid label { display: grid; gap: 5px; color: #45636a; font-size: .82rem; font-weight: 650; }
.materials-chart-control-grid input, .materials-chart-control-grid select { width: 100%; min-width: 0; padding: 7px 9px; }
.materials-plot-wrap { overflow: auto; }
.materials-chart-downloads { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 9px; }
.materials-ai-panel { margin-top: 14px; padding: 16px; border: 1px solid #d5e8e1; border-radius: 14px; background: linear-gradient(145deg,#f7fcfa,#fff); }
.materials-ai-panel > h4 { margin: 0 0 8px; color: #20545c; }
.materials-ai-section { margin-top: 10px; padding: 11px 13px; border-left: 3px solid #4c9a84; border-radius: 8px; background: #f6faf8; }
.materials-ai-section h5 { margin: 0 0 5px; color: #285b51; font-size: .95rem; }
.materials-ai-section p { margin: 0; line-height: 1.65; }
.materials-send-scope { margin: 8px 0 12px; padding: 8px 10px; border: 1px solid #e1ece8; border-radius: 9px; }
.materials-send-scope summary { cursor: pointer; color: #315e55; font-weight: 650; }
.materials-result-card > .result-summary, .materials-result-card > .materials-evidence-boundary, .materials-result-card > .materials-quality-evaluation { display: none; }
.materials-evidence-boundary { display: grid; gap: 9px; margin: 12px 0; padding: 12px; border: 1px solid #dce9e5; border-radius: 12px; background: #fcfffd; }
.materials-evidence-boundary > strong { color: #315e55; }
.materials-evidence-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.materials-evidence-item { display: grid; gap: 4px; padding: 9px 10px; border-radius: 9px; background: #f5faf8; border-left: 3px solid #6fa59a; }
.materials-evidence-item span { font-size: .82rem; font-weight: 760; color: #2c5d58; }
.materials-evidence-item p { margin: 0; font-size: .78rem; line-height: 1.48; }
.materials-evidence-item.cannot { border-left-color: #c79256; background: #fffaf1; }
.materials-evidence-item.next { border-left-color: #6a86b5; background: #f5f8ff; }
.materials-insight-output { margin-top: 14px; }
.materials-insight-output h4 { color: #315e55; }
.materials-download-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0 16px; padding: 14px; border: 1px solid #d7e9e3; border-radius: 14px; background: #f4faf7; }
.materials-download-links::before { content: '报告文件'; width: 100%; color: #315e55; font-size: .9rem; font-weight: 750; }
.materials-mini-chart { display: block; width: 100%; height: auto; min-width: 620px; margin: 8px 0; background: #fff; font-family: Arial, "Microsoft YaHei", sans-serif; }
.materials-result-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 10px; }
.materials-mini-chart .chart-label, .materials-mini-chart .chart-tick { fill: #354d56; font-family: Arial, "Microsoft YaHei", sans-serif; }
.materials-mini-chart .chart-title { fill: #203c46; font-family: Arial, "Microsoft YaHei", sans-serif; font-weight: 650; }
.materials-mini-chart .chart-grid { stroke: #e6ecea; stroke-width: 1; }
.chart-axis { fill: none; stroke: #9bb7b4; stroke-width: 1.4; }
.chart-series { fill: none; stroke: #177b78; stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.chart-bar { fill: #24877f; stroke: #176f68; stroke-width: 1; }
.chart-prediction { fill: none; stroke: #c17a35; stroke-width: 2; stroke-dasharray: 7 5; stroke-linejoin: round; }
.chart-label { fill: #50706d; font-size: 13px; }
@media (max-width: 850px) {
  .materials-workbench-layout, .materials-context-grid { grid-template-columns: 1fr; }
  .materials-result-grid { grid-template-columns: 1fr; }
  .materials-evidence-grid { grid-template-columns: 1fr; }
  .materials-chart-control-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .materials-chart-workspace { padding: 10px; }
  .materials-mini-chart { width: 600px; min-width: 600px; }
  .office-integrated-fields { grid-template-columns: 1fr; }
}
input, select, textarea { border-color: #c8d8dd; border-radius: 11px; background: rgba(255,255,255,.96); transition: border-color .18s ease, box-shadow .18s ease; }
input:focus, select:focus, textarea:focus { border-color: #5aa4ae; box-shadow: 0 0 0 4px rgba(90,164,174,.14); outline: none; }
button { border-radius: 11px; background: var(--brand); box-shadow: 0 5px 12px rgba(23,107,120,.14); }
button:hover:not(:disabled), .download-link:hover { background: var(--brand-dark); transform: translateY(-1px); }
button.secondary { background: #eaf1f3; box-shadow: none; }
.ppt-page-workspace { background: linear-gradient(135deg, #fbfffc, #f4fbf8); }
.ppt-generation-workflow { gap: 12px; }
.ppt-workflow-step { min-height: 112px; border-color: #d5e8dd; border-radius: 12px; padding: 14px; }
.ppt-generation-brief, .detail-card { border-radius: 12px; }
.conversation { margin-top: 18px; }
.message { box-shadow: 0 8px 22px rgba(32,70,80,.05); }
.route-card { padding: 22px; }
.download-link { border-radius: 11px; background: var(--brand); }
body.ppt-page-mode .controls { display: none; }
body.ppt-page-mode #conversation { display: none; }
body.module-page-mode #apiConfigPanel { display: none; }
body.module-page-mode .controls { background: rgba(255,255,255,.72); }
body.home-page-mode #moduleInfo { display: none; }
body.paper-page-mode #moduleInfo { display: none; }
body.home-page-mode .controls { display: none; }
body.home-page-mode .controls label[for="projectSelect"],
body.home-page-mode #projectSelect,
body.home-page-mode #projectHint { display: none; }
body.home-page-mode .controls { margin-top: 8px; }
.home-feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 18px; }
.home-feature-card { display: flex; min-height: 190px; flex-direction: column; align-items: flex-start; padding: 18px; border: 1px solid rgba(220,232,235,.95); border-radius: 16px; background: rgba(255,255,255,.82); box-shadow: 0 10px 24px rgba(32,70,80,.055); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.home-feature-card:hover { transform: translateY(-4px); border-color: #a8d0ce; box-shadow: 0 16px 30px rgba(32,70,80,.11); }
.home-feature-card h3 { margin: 12px 0 7px; color: #173b4a; font-size: 1.08rem; }
.home-feature-card h3 { font-size: 1.16rem; }
.home-feature-card p { margin: 0 0 16px; font-size: .99rem; line-height: 1.65; color: #5b707a; }
.home-feature-card button { margin-top: auto; padding: 8px 13px; font-size: .9rem; }
.home-feature-icon { display: grid; width: 44px; height: 44px; place-items: center; border-radius: 14px; color: #176b78; background: #e4f4f1; font-size: 1.35rem; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(23,107,120,.08); }
.home-feature-card[data-module="ppt-reconstruction"] .home-feature-icon { color: #8b6a32; background: #fff1d9; }
.home-feature-card[data-module="materials-analysis"] .home-feature-icon { color: #4e7d61; background: #e9f4e8; }
.home-feature-card[data-module="office-agent"] .home-feature-icon { color: #78624a; background: #f5eee5; }
.home-feature-card[data-module="research-assist"] .home-feature-icon { color: #745d91; background: #f1eafa; }
.office-integrated-workspace { display: grid; gap: 16px; margin-top: 16px; padding: 22px; border: 1px solid #d9e9e6; border-radius: 18px; background: linear-gradient(145deg, rgba(250,255,253,.98), rgba(244,250,249,.9)); box-shadow: 0 12px 28px rgba(32,70,80,.06); }
.office-integrated-workspace h2, .office-integrated-workspace h3 { margin: 0; color: #174f59; }
.office-source-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.office-source-choice { display: grid; gap: 5px; min-height: 86px; padding: 15px 16px; text-align: left; border: 1px solid #d2e4e1; border-radius: 14px; background: rgba(255,255,255,.86); color: #2c5960; box-shadow: none; }
.office-source-choice span { color: #6a7f85; font-size: .9rem; font-weight: 400; line-height: 1.45; }
.office-source-choice:hover:not(:disabled), .office-source-choice.active { border-color: #2b8a8c; background: #eaf7f4; color: #155b61; box-shadow: inset 0 0 0 1px rgba(43,138,140,.14); transform: none; }
.office-integrated-fields { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(170px, .65fr) minmax(180px, .75fr); gap: 8px 12px; align-items: end; }
.office-integrated-fields label, .office-input-region label { display: block; margin-top: 2px; color: #315b61; font-weight: 750; }
.office-integrated-field { display: grid; gap: 6px; }
.office-integrated-fields input, .office-integrated-fields select { width: 100%; }
.office-input-region { display: grid; gap: 8px; }
.office-input-region textarea { width: 100%; min-height: 220px; line-height: 1.65; resize: vertical; }
.office-input-region input[type="file"] { padding: 10px; background: rgba(255,255,255,.9); }
.office-recorder-card { display: grid; gap: 9px; padding: 15px; border: 1px solid #d9e8e4; border-radius: 14px; background: rgba(255,255,255,.78); }
.office-recorder-card p { margin: 0; }
.office-recorder-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.office-recording-time { min-width: 92px; color: #a34d3c; font-variant-numeric: tabular-nums; font-weight: 750; }
.office-recorder-card audio { width: min(100%, 520px); height: 42px; }
.office-integrated-status { min-height: 1.3em; margin: 0; }
.office-glossary-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.office-glossary-actions .text-button { padding: 6px 10px; border-radius: 8px; background: #eef7f5; }
.office-transcript-normalization { padding: 10px 12px; border-radius: 10px; background: #fff8e7; color: #73551e; }
.office-config-warning { padding: 12px 14px; border: 1px solid #f0d9a2; border-radius: 10px; background: #fff8e7; color: #73551e; }
.module-readiness-inline { display: grid; gap: 4px; padding: 12px 14px; border: 1px solid #cfe5df; border-radius: 12px; background: #effaf6; color: #23635d; }
.module-readiness-inline.warning { border-color: #f0d9a2; background: #fff8e7; color: #73551e; }
.module-action-summary { display: grid; gap: 5px; margin: 10px 0 12px; padding: 13px 15px; border: 1px solid #d6e8e4; border-radius: 12px; background: rgba(241,250,247,.78); }
.module-action-summary strong { color: #155b61; }
.module-action-summary p { margin: 0; }
.module-boundary-hint { margin-top: 12px; }
.office-confirmation-card, .office-result-card { display: grid; gap: 12px; padding: 18px; border: 1px solid #e5d9b9; border-radius: 15px; background: #fffaf0; }
.office-result-card { border-color: #cfe5d8; background: #f5fbf7; }
.office-confirmation-card ul, .office-result-card ul { margin: 0; }
.office-result-section { padding: 10px 12px; border: 1px solid #dbe9e5; border-radius: 11px; background: rgba(255,255,255,.76); }
.office-result-section summary { cursor: pointer; color: #225963; font-weight: 750; }
.office-result-section pre { max-height: 320px; overflow: auto; white-space: pre-wrap; }
.paper-mode-switcher { margin: 2px 0 20px; padding: 16px; border: 1px solid #d8e8eb; border-radius: 16px; background: linear-gradient(135deg, rgba(239,249,247,.9), rgba(255,255,255,.96)); }
.paper-mode-title { margin-bottom: 10px; color: #254b56; font-weight: 800; }
.paper-mode-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.paper-mode-option { display: grid; gap: 4px; min-height: 76px; padding: 12px 14px; text-align: left; border: 1px solid #cfe1e4; border-radius: 12px; background: rgba(255,255,255,.86); color: #315460; box-shadow: none; }
.paper-mode-option strong { font-size: 1rem; }
.paper-mode-option span { color: #6c8189; font-size: .86rem; font-weight: 400; line-height: 1.45; }
.paper-mode-option:hover:not(:disabled) { background: #f4fbfa; border-color: #7db6b7; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(32,70,80,.08); }
.paper-mode-option.active { border-color: #2b8a8c; background: #e9f7f4; color: #155b61; box-shadow: inset 0 0 0 1px rgba(43,138,140,.15); }
.paper-mode-option.active span { color: #39757a; }
.paper-scale-hint, .paper-revision-scale-note { margin: 6px 0 10px; font-size: .9rem; line-height: 1.55; }
.paper-quick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.paper-quick-actions button { padding: 8px 12px; font-size: .9rem; }
.paper-example-note { align-self: center; font-size: .88rem; }
.paper-length-hint { display: block; margin-top: 10px; color: #5f7480; }
.wizard-progress strong { font-size: 1.12rem; }
.panel h2 { font-size: 1.34rem; line-height: 1.35; }
.panel h3 { line-height: 1.4; }
body { font-size: 16px; }
input, select, textarea { font-size: 1rem; }
@media (max-width: 720px) {
  .finance-chat { min-height: 76vh; grid-template-rows: minmax(300px, 1fr) auto; border-radius: 14px; }
  .finance-chat-history { min-height: 300px; max-height: 65vh; padding: 14px; }
  .finance-chat-answer { padding: 14px; }
  .finance-chat-composer-footer { align-items: flex-end; }
  .finance-chat-composer-footer > span { max-width: 62%; line-height: 1.4; }
  .shell { width: min(100% - 22px, 1180px); }
  .top-nav { align-items: flex-start; flex-direction: column; }
  .nav-links { justify-content: flex-start; }
  .wizard-bar { grid-template-columns: 1fr 1fr; }
  .wizard-progress { grid-column: 1 / -1; grid-row: 1; }
  .wizard-nav-button { grid-row: 2; }
  .wizard-nav-button:last-child { justify-self: end; }
  .api-config-grid, .ppt-brief-options, .ppt-entry-choice-grid, .finance-assistant-tabs, .paper-mode-options, .paper-diff-side-by-side { grid-template-columns: 1fr; }
  .office-source-actions { grid-template-columns: 1fr; }
  .hero { min-height: 220px; padding: 24px 22px 26px; background: linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.9) 64%, rgba(255,255,255,.35) 100%), url("/static/assets/research-hero.png") 72% center / cover no-repeat; }
  .hero h1 { font-size: clamp(2rem, 10vw, 2.8rem); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* UI refresh: visual hierarchy, compact API setup and module illustrations. */
.api-config-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0 14px; }
.api-config-tab { display: grid; gap: 4px; min-height: 68px; padding: 12px 14px; text-align: left; border: 1px solid #d5e5e5; border-radius: 14px; background: rgba(255,255,255,.75); color: #315b61; box-shadow: none; }
.api-config-tab span { color: #6b7e84; font-size: .86rem; font-weight: 400; line-height: 1.35; }
.api-config-tab:hover:not(:disabled), .api-config-tab.active { color: #155b61; border-color: #2b8a8c; background: #e9f7f4; box-shadow: inset 0 0 0 1px rgba(43,138,140,.12); transform: none; }
.api-config-tab-content { min-height: 300px; }
.api-config-tab-content > [hidden] { display: none !important; }
.api-config-section { animation: panel-in .22s ease both; }
.module-boundary-details, .api-config-disclosure { margin-top: 12px; padding: 10px 13px; border: 1px solid #dbe7e8; border-radius: 12px; background: rgba(248,252,252,.8); }
.module-boundary-details summary, .api-config-disclosure summary { cursor: pointer; color: #35656b; font-weight: 750; }
.module-boundary-details[open] summary, .api-config-disclosure[open] summary { margin-bottom: 8px; }
.module-boundary-details .list-block { margin-top: 0; }
.api-config-disclosure p { margin: 8px 0 0; line-height: 1.55; }
.api-config-disclosure.api-provider-warning { background: #fffaf0; border-color: #eadfbf; color: #725526; }
.api-config-disclosure.api-provider-reference { background: #f5fbf8; border-color: #d9e9e2; color: #285b51; }
.module-info > h2 { margin-bottom: 6px; }
.module-info > .muted { margin-top: 0; }
.module-info h3 { margin-top: 16px; margin-bottom: 5px; }
.module-info > .list-block { display: none; }
.module-info { padding-top: 20px; padding-bottom: 20px; }
.api-config-overall-note { padding: 11px 14px; }
@keyframes panel-in { from { opacity: .45; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

.hero { background-image: linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.94) 38%, rgba(255,255,255,.34) 76%, rgba(255,255,255,.08) 100%), url("/static/assets/research-hero.png"); }
body.paper-page-mode .hero { background-image: linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.94) 39%, rgba(255,255,255,.32) 76%, rgba(255,255,255,.08) 100%), url("/static/assets/hero-paper.svg"); }
body.ppt-page-mode .hero { background-image: linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.94) 39%, rgba(255,255,255,.3) 76%, rgba(255,255,255,.08) 100%), url("/static/assets/hero-ppt.svg"); }
body.office-page-mode .hero { background-image: linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.94) 39%, rgba(255,255,255,.3) 76%, rgba(255,255,255,.08) 100%), url("/static/assets/hero-office.svg"); }
body.materials-page-mode .hero { background-image: linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.94) 39%, rgba(255,255,255,.3) 76%, rgba(255,255,255,.08) 100%), url("/static/assets/hero-materials.svg"); }
body.finance-page-mode .hero { background-image: linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.94) 39%, rgba(255,255,255,.3) 76%, rgba(255,255,255,.08) 100%), url("/static/assets/hero-finance.svg"); }

.home-feature-card { position: relative; overflow: hidden; min-height: 248px; padding: 0 18px 18px; }
.home-feature-card::after { content: ""; position: absolute; inset: auto -28px -42px auto; width: 120px; height: 120px; border-radius: 50%; background: rgba(91,177,167,.12); pointer-events: none; }
.home-feature-art { width: calc(100% + 36px); height: 104px; margin: 0 -18px 14px; border-bottom: 1px solid rgba(213,229,230,.85); background-position: center; background-size: cover; background-repeat: no-repeat; }
.home-feature-card[data-module="paper-writing"] .home-feature-art { background-image: url("/static/assets/hero-paper.svg"); }
.home-feature-card[data-module="ppt-reconstruction"] .home-feature-art { background-image: url("/static/assets/hero-ppt.svg"); }
.home-feature-card[data-module="office-agent"] .home-feature-art { background-image: url("/static/assets/hero-office.svg"); }
.home-feature-card[data-module="materials-analysis"] .home-feature-art { background-image: url("/static/assets/hero-materials.svg"); }
.home-feature-card[data-module="finance-assistant"] .home-feature-art { background-image: url("/static/assets/hero-finance.svg"); }
.home-feature-card[data-module="research-assist"] .home-feature-art { background-image: url("/static/assets/research-hero.png"); }
.home-feature-icon { position: absolute; top: 78px; left: 18px; width: 46px; height: 46px; border: 4px solid rgba(255,255,255,.9); box-shadow: 0 5px 14px rgba(32,70,80,.14); }
.home-feature-card h3, .home-feature-card p, .home-feature-card button { position: relative; z-index: 1; }
.home-feature-card h3 { margin-top: 7px; }
.home-product-brief { margin: 4px 0 22px; padding: 18px 20px 16px; border: 1px solid #d7e9e6; border-radius: 18px; background: linear-gradient(135deg, rgba(238,249,246,.92), rgba(255,255,255,.9)); }
.home-product-kicker { margin-bottom: 5px; color: #2b8a8c; font-size: .74rem; font-weight: 800; letter-spacing: .1em; }
.home-product-brief h2 { margin: 0 0 6px; font-size: 1.25rem; }
.home-product-brief > p { max-width: 760px; margin: 0; }
.home-product-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.home-product-flow-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid rgba(207,228,224,.9); border-radius: 12px; background: rgba(255,255,255,.66); }
.home-product-flow-number { flex: 0 0 auto; color: #d18b43; font-size: .72rem; font-weight: 850; letter-spacing: .06em; }
.home-product-flow-item strong, .home-product-flow-item span { display: block; }
.home-product-flow-item strong { color: #214f59; font-size: .88rem; }
.home-product-flow-item .muted { margin-top: 2px; color: #6a7f85; font-size: .78rem; line-height: 1.4; }
.home-feature-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-height: 22px; margin: 2px 0 5px; }
.home-feature-status, .home-feature-source { display: inline-flex; align-items: center; min-height: 21px; padding: 2px 8px; border-radius: 999px; font-size: .7rem; line-height: 1.25; }
.home-feature-status { font-weight: 800; }
.home-feature-status.status-core { color: #155b61; background: #e1f4ef; }
.home-feature-status.status-specialized { color: #78541e; background: #fff2d9; }
.home-feature-status.status-pilot { color: #5e4c83; background: #eee8fb; }
.home-feature-status.status-utility { color: #53656d; background: #edf2f3; }
.home-feature-source { color: #5e747b; background: rgba(244,248,248,.9); border: 1px solid #dce9e8; }
.home-feature-output { margin: 3px 0 11px; color: #47717a; font-size: .78rem; line-height: 1.4; }
.home-example-files { margin-top: 22px; padding: 18px 20px 20px; border: 1px solid #d7e9e6; border-radius: 18px; background: rgba(250,253,252,.9); }
.home-example-files h2 { margin: 0 0 5px; font-size: 1.22rem; }
.home-example-files > p { max-width: 760px; margin: 0; }
.home-example-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 12px; margin-top: 15px; }
.home-example-group { padding: 13px; border: 1px solid #e0ecea; border-radius: 14px; background: rgba(255,255,255,.82); }
.home-example-group h3 { margin: 0 0 9px; color: #285d65; font-size: .95rem; }
.home-example-links { display: flex; flex-wrap: wrap; gap: 7px; }
.home-example-links .download-link { display: inline-flex; min-height: 30px; align-items: center; padding: 5px 9px; border-radius: 9px; font-size: .78rem; }
.home-example-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 4px 8px; border: 1px solid #dce9e8; border-radius: 8px; color: #587078; background: #f7fbfa; font-size: .77rem; }
.home-example-links button { width: 100%; margin-top: 3px; }
.embedded-example-actions { display: flex; flex-wrap: wrap; gap: 7px; margin: 8px 0 10px; }
.embedded-example-actions .text-button { color: #216d76; font-size: .82rem; }
.home-readiness-panel { margin: 0 0 22px; padding: 16px 18px; border: 1px solid #dce8eb; border-radius: 16px; background: rgba(255,255,255,.78); }
.home-readiness-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.home-readiness-header h3 { margin: 0; color: #214f59; font-size: 1rem; }
.home-readiness-header p { margin: 3px 0 0; }
.home-readiness-header button { flex: 0 0 auto; padding: 7px 11px; font-size: .8rem; }
.home-readiness-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.home-readiness-item { min-width: 0; padding: 10px 11px; border: 1px solid #dce9e8; border-radius: 11px; background: #f8fbfb; }
.home-readiness-item.ready { border-color: #cfe5d8; background: #f3fbf6; }
.home-readiness-item.partial { border-color: #eadfbf; background: #fffaf0; }
.home-readiness-item.needs-config { border-color: #d9d0eb; background: #faf8ff; }
.home-readiness-item.unavailable { border-color: #ecd1d1; background: #fff7f7; }
.home-readiness-item-header { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.home-readiness-item-header strong { color: #285a62; font-size: .84rem; }
.home-readiness-status { flex: 0 0 auto; color: #4b6e72; font-size: .7rem; font-weight: 800; text-align: right; }
.home-readiness-source { display: block; margin-top: 4px; color: #70848a; font-size: .72rem; line-height: 1.35; }
.home-readiness-item p { margin: 7px 0 0; color: #62777d; font-size: .76rem; line-height: 1.45; }
.home-readiness-note { grid-column: 1 / -1; margin: 1px 0 0; font-size: .76rem; }

.quality-evaluation-card { margin: 12px 0; padding: 13px 14px; border: 1px solid #dce8eb; border-radius: 13px; background: #f8fbfb; }
.quality-evaluation-card.good { border-color: #cfe5d8; background: #f3fbf6; }
.quality-evaluation-card.review { border-color: #eadfbf; background: #fffaf0; }
.quality-evaluation-card.blocked { border-color: #ecd1d1; background: #fff7f7; }
.quality-evaluation-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.quality-evaluation-header strong { color: #214f59; font-size: .92rem; }
.quality-evaluation-level { padding: 3px 8px; border-radius: 999px; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.quality-evaluation-level.good { color: #216346; background: #dff2e6; }
.quality-evaluation-level.review { color: #825c1c; background: #ffedc7; }
.quality-evaluation-level.blocked { color: #9a3b3b; background: #f8dede; }
.quality-evaluation-summary { margin: 7px 0 9px; color: #4e6870; font-size: .84rem; }
.quality-evaluation-checks { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.quality-check { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; padding: 6px 8px; border-radius: 8px; background: rgba(255,255,255,.62); font-size: .78rem; line-height: 1.45; }
.quality-check strong { color: #315b61; }
.quality-check.pass { border-left: 3px solid #65a77d; }
.quality-check.review { border-left: 3px solid #d1a34e; }
.quality-check.blocked { border-left: 3px solid #c85d5d; }
.quality-evaluation-scope { margin: 9px 0 0; color: #718188; font-size: .74rem; line-height: 1.45; }
.unified-result-header { display: grid; gap: 6px; margin-bottom: 14px; padding: 13px 15px; border: 1px solid #d7e8e5; border-radius: 13px; background: linear-gradient(135deg, #f2faf8, #fbfdfc); }
.unified-result-header-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.unified-result-header-top strong { color: #174f59; font-size: 1rem; }
.unified-result-summary, .unified-result-next { margin: 0; color: #536e75; line-height: 1.55; }
.unified-result-next { color: #23635d; font-weight: 650; }
.workflow-action-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 16px; padding-top: 13px; border-top: 1px solid #dce9e6; }
.workflow-action-bar::before { content: "接下来"; flex: 0 0 100%; color: #527078; font-size: .82rem; font-weight: 750; }
.workflow-action-bar button { min-height: 38px; }

.module-info { position: relative; overflow: hidden; }
.module-info::after { content: ""; position: absolute; right: 22px; top: 18px; width: 80px; height: 80px; border: 1px solid rgba(43,138,140,.18); border-radius: 24px; transform: rotate(15deg); pointer-events: none; }
.wizard-bar { position: sticky; top: 16px; z-index: 15; }
.nav-links a { font-size: .88rem; }
.brand::before { content: "✦"; display: inline-grid; width: 24px; height: 24px; place-items: center; margin-right: 7px; border-radius: 8px; color: #fff; background: linear-gradient(135deg, #2b8a8c, #d18b43); font-size: .78rem; vertical-align: -2px; }

@media (max-width: 720px) {
  .api-config-tabs { grid-template-columns: 1fr; }
  .api-config-tab-content { min-height: 0; }
  .home-feature-card { min-height: 228px; }
  .home-feature-art { height: 88px; }
  .home-product-flow { grid-template-columns: 1fr; gap: 7px; }
  .home-product-brief { padding: 16px; }
  .home-example-files { padding: 15px; }
  .home-readiness-list { grid-template-columns: 1fr; }
  .home-readiness-note { grid-column: auto; }
  .wizard-bar { top: 8px; }
}

/* Typography polish: calmer Chinese text hierarchy and denser reading rhythm. */
body {
  font-family: "Aptos", "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 15px;
  letter-spacing: .005em;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, strong, button, label, summary { letter-spacing: 0; }
h1 { font-size: clamp(2rem, 3.7vw, 3rem); font-weight: 760; letter-spacing: -.035em; }
h2 { font-size: clamp(1.22rem, 2vw, 1.55rem); font-weight: 760; letter-spacing: -.018em; }
h3 { font-size: 1.08rem; font-weight: 740; }
h4 { font-size: .96rem; font-weight: 720; }
p, li, dd { font-size: .95rem; }
.muted { font-size: .91rem; line-height: 1.62; color: #657780; }
.eyebrow { font-size: .76rem; letter-spacing: .11em; }
.subhead { font-size: 1rem; line-height: 1.68; }
.brand { font-size: .94rem; font-weight: 760; }
.nav-links a { font-size: .82rem; font-weight: 700; letter-spacing: .01em; }
.wizard-step-label { font-size: .72rem; letter-spacing: .1em; }
.wizard-progress strong { font-size: 1rem; font-weight: 760; }
.wizard-page-hint { font-size: .8rem; }
.panel { padding: 21px; }
.panel > h2:first-child { margin-top: 0; margin-bottom: 10px; }
.panel > p:first-of-type { margin-top: 6px; }
.api-config-panel h2 { font-size: 1.28rem; }
.api-config-section h3 { font-size: 1.1rem; }
.api-config-section label, .alloymind-form label, .controls label { font-size: .88rem; font-weight: 720; color: #315b61; }
input, select, textarea { font-size: .94rem; line-height: 1.45; }
input, select { min-height: 41px; }
textarea { line-height: 1.62; }
button, .download-link { font-size: .9rem; line-height: 1.35; }
button.secondary { color: #34545d; }
.api-config-status, .api-config-overall-note, .api-provider-reference, .api-provider-warning { font-size: .88rem; line-height: 1.55; }
.api-config-status strong, .api-config-overall-note strong { font-size: .9rem; }
.api-config-tab strong { font-size: .94rem; }
.api-config-tab span { font-size: .8rem; }
.module-info { padding-top: 18px; padding-bottom: 18px; }
.module-info h3 { font-size: 1rem; }
.module-boundary-details summary, .api-config-disclosure summary { font-size: .86rem; }
.home-feature-card h3 { font-size: 1.02rem; font-weight: 760; }
.home-feature-card p { font-size: .88rem; line-height: 1.58; }
.home-feature-card button { font-size: .82rem; padding: 7px 11px; }
.home-feature-icon { font-size: 1.18rem; }
.message, .route-card { line-height: 1.62; }
.message { padding: 12px 15px; }
.route-card { padding: 19px; }
.pill { font-size: .76rem; }
.materials-analysis-choice span, .ppt-workflow-step span, .office-source-choice span { font-size: .84rem; line-height: 1.48; }
.materials-analysis-choice { padding: 12px 13px; }
.materials-analysis-choice strong { font-size: .94rem; }
.alloymind-result, .safe-json { font-size: .86rem; }
.result-summary, .result-callout { font-size: .9rem; }
.paper-diff-highlighted, .prompt-preview { font-size: .92rem; line-height: 1.75; }
.error { font-size: .9rem; line-height: 1.55; }
.field-error { margin: 5px 0 0; color: #9a3b3b; font-size: .84rem; line-height: 1.45; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"], input[type="file"][aria-invalid="true"] {
  border-color: #c85d5d;
  box-shadow: 0 0 0 3px rgba(200, 93, 93, .12);
}

@media (max-width: 720px) {
  body { font-size: 14px; }
  h1 { font-size: clamp(1.85rem, 9vw, 2.5rem); }
  .panel { padding: 17px; }
  .hero { min-height: 205px; }
  .subhead { font-size: .94rem; }
  .nav-links a { font-size: .78rem; padding: 7px 9px; }
  .home-feature-card p { font-size: .86rem; }
}

/* Small-screen usability: keep the page readable without horizontal overflow. */
@media (max-width: 720px) {
  .shell { width: min(100% - 24px, 1180px); padding-top: 14px; }
  .top-nav { align-items: stretch; flex-direction: column; gap: 8px; margin-bottom: 16px; padding: 10px 12px; }
  .brand { font-size: .9rem; }
  .nav-links { width: 100%; flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
  .nav-links a { flex: 0 0 auto; white-space: nowrap; }
  .hero { min-height: 170px; padding: 22px 20px 24px; border-radius: 18px; background-position: 72% center; }
  .hero h1 { max-width: 13em; }
  .wizard-bar { grid-template-columns: 1fr 1fr; gap: 9px; padding: 10px 11px; margin-bottom: 12px; }
  .wizard-progress { grid-column: 1 / -1; grid-row: 1; }
  .wizard-nav-button { grid-row: 2; min-width: 0; width: 100%; }
  .wizard-nav-button:last-child { justify-self: stretch; }
  .panel, .route-card, .message { border-radius: 14px; }
  .route-card { padding: 15px; }
  .message { max-width: 100%; padding: 11px 13px; }
  .workflow-action-bar { align-items: stretch; }
  .workflow-action-bar button, .workflow-action-bar .download-link { flex: 1 1 100%; width: 100%; text-align: center; }
  .unified-result-header { padding: 11px 12px; }
  .unified-result-header-top { align-items: flex-start; flex-direction: column; gap: 5px; }
  .quality-evaluation-header { align-items: flex-start; flex-direction: column; }
  .quality-check { grid-template-columns: 1fr; gap: 2px; }
  .paper-diff-toolbar button, .paper-quick-actions button { width: 100%; }
  .paper-diff-side-by-side { padding-left: 8px; padding-right: 8px; }
  .office-recorder-actions, .actions, .example-actions { align-items: stretch; }
  .office-recorder-actions button, .actions button, .example-actions button { flex: 1 1 100%; }
  input[type="file"] { max-width: 100%; }
  pre, .safe-json, .prompt-preview { max-width: 100%; overflow-x: auto; overflow-wrap: anywhere; }
}

@media (max-width: 420px) {
  .shell { width: calc(100% - 16px); }
  .panel { padding: 13px; }
  .hero { padding: 19px 15px 21px; }
  .hero h1 { font-size: clamp(1.65rem, 10vw, 2.2rem); }
  .subhead { font-size: .88rem; }
  .home-readiness-header { align-items: stretch; flex-direction: column; }
  .home-readiness-header button { width: 100%; }
  .ppt-entry-choice { min-height: 128px; padding: 14px; }
  .office-integrated-workspace, .finance-assistant-content { padding: 14px; }
  .office-source-choice { min-height: 72px; padding: 12px 13px; }
  .global-busy-indicator { right: 8px; bottom: 8px; max-width: calc(100vw - 16px); }
}

@media (prefers-reduced-motion: reduce) {
  .global-busy-spinner { animation: none; }
}

/* UI/UX refinement pass: research-workbench visual system.
   This layer intentionally changes presentation only; route and component behavior stay untouched. */
:root {
  --canvas: #f1f7f7;
  --surface: #ffffff;
  --surface-soft: #f7fbfa;
  --surface-warm: #fffaf0;
  --ink: #173b4a;
  --ink-soft: #355b66;
  --muted-ink: #536e77;
  --brand: #0d9488;
  --brand-dark: #0f766e;
  --accent: #d97706;
  --line: #d5e6e5;
  --line-strong: #b7d2d1;
  --focus-ring: #0f766e;
  --surface-radius: 16px;
  --surface-shadow: 0 12px 28px rgba(23, 59, 74, .07);
  --motion-fast: 160ms;
}

html { background: var(--canvas); }
body {
  color: var(--ink);
  background: var(--canvas);
  font-family: "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 16px;
  line-height: 1.62;
}

::selection { color: #fff; background: var(--brand-dark); }

.shell {
  width: min(1240px, calc(100% - 48px));
  padding: 24px 0 72px;
}

.top-nav {
  gap: 24px;
  margin: 0 0 24px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(23, 59, 74, .06);
  backdrop-filter: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  font-size: .96rem;
  font-weight: 800;
}

/* A compact wordmark is more stable than a platform-dependent emoji glyph. */
.brand::before {
  content: "AI";
  width: 28px;
  height: 28px;
  margin-right: 9px;
  border: 1px solid rgba(13, 148, 136, .24);
  border-radius: 8px;
  color: var(--brand-dark);
  background: #e6f6f3;
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: -.04em;
}

.nav-links { gap: 3px; }
.nav-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 7px 11px;
  border-radius: 9px;
  color: var(--ink-soft);
  font-size: .84rem;
  font-weight: 750;
  transition: color var(--motion-fast) ease, background var(--motion-fast) ease;
}
.nav-links a:hover { color: var(--brand-dark); background: #eef8f6; }
.nav-links a.active {
  color: #fff;
  background: var(--brand-dark);
  box-shadow: 0 4px 10px rgba(15, 118, 110, .18);
}

.hero {
  min-height: 248px;
  padding: 38px 42px 40px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background-color: var(--surface);
  box-shadow: var(--surface-shadow);
}
.hero .eyebrow { color: var(--brand-dark); }
.hero h1 {
  max-width: 18em;
  color: var(--ink);
  font-size: clamp(2.1rem, 4vw, 3.25rem);
  letter-spacing: -.035em;
}
.hero .subhead { max-width: 66ch; color: var(--muted-ink); }

.wizard-bar {
  gap: 18px;
  margin: 12px 0 20px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 7px 18px rgba(23, 59, 74, .05);
}
.wizard-progress { min-width: 0; }
.wizard-progress strong { color: var(--ink); font-size: 1.08rem; }
.wizard-step-label { color: var(--brand-dark); }
.wizard-page-hint { color: var(--muted-ink); }

.panel, .route-card, .message {
  border-color: var(--line);
  border-radius: var(--surface-radius);
  box-shadow: var(--surface-shadow);
}
.panel { padding: 24px; margin: 18px 0; }
.panel > h2:first-child { color: var(--ink); }
.module-info { background: var(--surface-soft); }

input, select, textarea {
  min-height: 44px;
  border-color: var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  background: var(--surface);
}
textarea { min-height: 128px; }
input::placeholder, textarea::placeholder { color: #536e77; opacity: 1; }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, .14);
}

button, .download-link {
  min-height: 44px;
  border-radius: 10px;
  background: var(--brand-dark);
  box-shadow: 0 5px 12px rgba(15, 118, 110, .14);
  transition: background var(--motion-fast) ease, box-shadow var(--motion-fast) ease, transform var(--motion-fast) ease;
}
button:hover:not(:disabled), .download-link:hover {
  background: #115e59;
  box-shadow: 0 8px 16px rgba(15, 118, 110, .18);
}
button.secondary {
  color: var(--ink-soft);
  background: #e9f2f2;
}
button.secondary:hover:not(:disabled) {
  color: var(--ink);
  background: #dceceb;
  box-shadow: none;
}
.text-button,
button.secondary.text-button {
  min-height: 40px;
  padding: 7px 10px;
  color: var(--brand-dark);
  background: transparent;
  box-shadow: none;
}
.text-button:hover:not(:disabled),
button.secondary.text-button:hover:not(:disabled) {
  color: var(--brand-dark);
  background: #e8f6f3;
  box-shadow: none;
  transform: none;
}
button:disabled {
  color: #536870;
}
button:focus-visible, .download-link:focus-visible, .nav-links a:focus-visible,
textarea:focus-visible, select:focus-visible, input:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}
button:disabled { min-height: 44px; }

.home-product-brief, .home-example-files, .home-readiness-panel {
  border-color: var(--line);
  border-radius: var(--surface-radius);
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(23, 59, 74, .045);
}
.home-product-brief {
  padding: 20px 22px 18px;
  border-top: 3px solid var(--brand);
  background: #f7fbfa;
}
.home-product-kicker { color: var(--brand-dark); }
.home-product-brief h2 { color: var(--ink); }
.home-product-flow { gap: 12px; }
.home-product-flow-item { border-color: #d9eae8; background: #fff; }
.home-product-flow-number { color: var(--accent); }

.home-feature-grid { gap: 16px; }
.home-feature-card {
  min-height: 252px;
  border-color: var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 8px 18px rgba(23, 59, 74, .05);
  transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, transform var(--motion-fast) ease;
}
.home-feature-card:hover {
  border-color: #8cc5bf;
  box-shadow: 0 14px 26px rgba(23, 59, 74, .10);
}
.home-feature-card h3 { color: var(--ink); }
.home-feature-card p { color: var(--muted-ink); }
.home-feature-icon { border-radius: 12px; }
.home-feature-card button { min-height: 44px; }

.card-grid { gap: 14px; }
.mini-card, .capability, .detail-card {
  border-color: #d9e7e8;
  border-radius: 12px;
  background: var(--surface-soft);
}
.conversation { max-width: 920px; margin-left: auto; margin-right: auto; }
.message { max-width: 78ch; }

.global-busy-indicator {
  border-color: #b8ddd8;
  color: var(--brand-dark);
  background: #f5fffd;
}

@media (max-width: 720px) {
  .shell { width: min(100% - 24px, 1240px); padding-top: 14px; }
  .top-nav { gap: 8px; margin-bottom: 16px; padding: 9px 11px; }
  .nav-links a { min-height: 42px; padding-inline: 10px; }
  .hero { min-height: 208px; padding: 28px 24px 30px; border-radius: 18px; }
  .hero h1 { font-size: clamp(1.9rem, 9vw, 2.65rem); }
  .panel { padding: 18px; }
  .home-feature-card { min-height: 230px; }
}

@media (max-width: 420px) {
  .shell { width: calc(100% - 16px); }
  .hero { padding: 24px 18px 26px; }
  .panel { padding: 15px; }
  .brand { font-size: .88rem; }
}

@media (prefers-reduced-motion: reduce) {
  button, .download-link, .home-feature-card, .nav-links a { transition: none; }
}

@media (max-width: 560px) {
  .top-nav { align-items: stretch; flex-direction: column; gap: 7px; }
  .nav-links { width: 100%; flex-wrap: wrap; overflow: visible; gap: 3px; }
  .nav-links a { flex: 0 0 auto; padding: 6px 7px; font-size: .78rem; }
}
