:root {
  --green: #16ad82;
  --green-dark: #0b7d62;
  --green-soft: #eaf8f3;
  --blue: #2f7ee6;
  --ink: #172231;
  --muted: #718096;
  --line: #e7ecef;
  --surface: #ffffff;
  --canvas: #f4f7f8;
  --shadow: 0 12px 32px rgba(25, 55, 70, 0.09);
  --radius: 18px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.eyebrow { color: var(--green-dark); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.button {
  border: 0;
  border-radius: 12px;
  padding: 11px 18px;
  background: var(--green);
  color: white;
  font-weight: 700;
  transition: .2s ease;
}
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(22, 173, 130, .2); }
.button.secondary { background: var(--green-soft); color: var(--green-dark); }
.button.ghost { background: white; color: var(--ink); border: 1px solid var(--line); }
.button.danger { background: #fff0f0; color: #b42318; }
.button.small { padding: 8px 12px; font-size: 13px; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); background: white; border-radius: 12px; }

.badge, .tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--green-dark);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 700;
}
.badge.blue { color: #1c64c7; background: #edf5ff; }
.badge.amber { color: #9a5a00; background: #fff6df; }
.badge.gray { color: #5f6b7a; background: #f0f3f5; }
.badge.published { color: #067647; background: #ecfdf3; }
.badge.review { color: #b54708; background: #fffaeb; }
.badge.draft { color: #475467; background: #f2f4f7; }

/* Admin */
.admin-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  padding: 28px 20px;
  color: white;
  background: linear-gradient(180deg, #102d31 0%, #0c2228 100%);
}
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 36px; }
.brand-mark { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, #30d3a5, #129d78); font-weight: 900; }
.brand strong { display: block; font-size: 18px; }
.brand small { color: #9fb8bc; }
.nav { display: grid; gap: 8px; }
.nav button {
  border: 0; border-radius: 12px; padding: 13px 14px; text-align: left;
  color: #b8c9cc; background: transparent; font-weight: 650;
}
.nav button:hover, .nav button.active { color: white; background: rgba(255,255,255,.1); }
.sidebar-footer { position: absolute; left: 20px; right: 20px; bottom: 24px; color: #89a4a8; font-size: 12px; line-height: 1.7; }
.admin-main { min-width: 0; }
.admin-topbar {
  height: 76px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 36px; background: rgba(255,255,255,.9); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10; backdrop-filter: blur(16px);
}
.admin-topbar h1 { font-size: 20px; margin: 0; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.admin-content { padding: 30px 36px 60px; max-width: 1500px; margin: auto; }
.view { display: none; }
.view.active { display: block; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-head h2 { margin: 0 0 6px; font-size: 26px; }
.section-head p { margin: 0; color: var(--muted); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 4px 16px rgba(25,55,70,.04); }
.stat-card .value { font-size: 32px; font-weight: 800; margin: 10px 0 4px; }
.panel { background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 16px rgba(25,55,70,.04); overflow: hidden; }
.panel-header { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.panel-header h3 { margin: 0; font-size: 16px; }
.panel-body { padding: 20px; }
.dashboard-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 20px; }
.workflow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.workflow-step { padding: 16px; border-radius: 14px; background: #f8fafb; border: 1px solid var(--line); }
.workflow-step b { display: block; margin: 8px 0 4px; }
.workflow-step span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.step-number { width: 28px; height: 28px; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); display: grid; place-items: center; font-weight: 800; }
.activity-list { display: grid; gap: 0; }
.activity { padding: 13px 0; border-bottom: 1px solid var(--line); }
.activity:last-child { border-bottom: 0; }
.activity b { display: block; font-size: 13px; margin-bottom: 4px; }
.activity small { color: var(--muted); }

.toolbar { display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.search-input { min-width: 280px; flex: 1; position: relative; }
.search-input input, .field input, .field textarea, .field select {
  width: 100%; border: 1px solid #d9e1e5; border-radius: 12px; background: white; color: var(--ink); padding: 11px 13px; outline: none;
}
.field textarea { min-height: 100px; resize: vertical; line-height: 1.6; }
.search-input input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,173,130,.1); }
.toolbar select { border: 1px solid #d9e1e5; border-radius: 12px; padding: 10px 12px; background: white; }
.literature-table { width: 100%; border-collapse: collapse; }
.literature-table th { color: var(--muted); font-size: 12px; text-align: left; padding: 12px 16px; background: #fafcfc; }
.literature-table td { padding:15px 16px; border-top:1px solid var(--line); vertical-align:middle; }
.literature-table .title-cell { min-width: 340px; }
.literature-table .title-cell b { display: block; margin-bottom: 6px; }
.literature-table .title-cell small { color: var(--muted); }
.product-file-meta { display:flex; flex-direction:column; align-items:flex-start; gap:2px; margin-top:6px; line-height:1.45; }
.literature-title { display:block; max-width:100%; margin-bottom:7px; text-align:left; line-height:1.45; }
.publication-date { display:block; }
.literature-if { display:block; width:max-content; margin-top:6px; padding:2px 7px; border-radius:999px; color:#08785c; background:#e7f8f2; font-weight:800; }
.literature-if.missing { color:#8a98a5; background:#f1f4f5; font-weight:600; }
.literature-table th:nth-child(3), .literature-table .status-cell { width:96px; min-width:96px; text-align:center; }
.literature-table th:nth-child(4), .literature-table .operation-cell { text-align:center; }
.literature-table .status-cell { vertical-align:middle; }
.literature-table .status-cell .badge { justify-content:center; min-width:68px; white-space:nowrap; word-break:keep-all; }
.tag-line { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.row-actions { display: flex; flex-wrap:wrap; gap: 7px; }
.row-actions .button { white-space:nowrap; word-break:keep-all; }
.literature-table .operation-cell { min-width:270px; vertical-align:middle; }
.literature-row-actions { flex-wrap:nowrap; align-items:center; justify-content:center; }
.literature-row-actions .button { min-width:72px; padding-inline:12px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(9, 25, 29, .5); display: grid; place-items: center; padding: 24px; }
.modal { width: min(820px, 100%); max-height: 92vh; overflow: auto; background: white; border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.2); }
.modal-header { position: sticky; top: 0; z-index: 2; padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; background: white; border-bottom: 1px solid var(--line); }
.modal-header h3 { margin: 0; }
.modal-body { padding: 24px; }
.modal-footer { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; background: white; border-top: 1px solid var(--line); }
.section-head-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:10px; }
.document-title-button { padding:0; border:0; background:transparent; color:var(--ink); font:inherit; font-weight:800; text-align:left; cursor:pointer; }
.document-title-button:hover { color:var(--primary); text-decoration:underline; text-underline-offset:3px; }
.modal.document-preview-modal { width:min(1540px,calc(100vw - 24px)); max-height:97vh; }
.modal.product-upload-modal { width:min(900px,calc(100vw - 32px)); }
.document-preview-body { display:block; padding:0; background:#f5f9fa; }
.document-preview-tabs { display:flex; gap:6px; padding:12px 18px; border-bottom:1px solid var(--line); background:white; }
.document-preview-tabs button { padding:10px 18px; border:0; border-radius:10px; color:#607286; background:transparent; font-weight:800; cursor:pointer; }
.document-preview-tabs button.active { color:#126c59; background:#eaf8f4; }
#literaturePreviewContent { padding:14px; }
.preview-pane { min-width:0; overflow:hidden; border:1px solid var(--line); border-radius:16px; background:white; }
.preview-pane > header { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:68px; padding:14px 16px; border-bottom:1px solid var(--line); }
.preview-pane > header div { min-width:0; }
.preview-pane > header b,.preview-pane > header small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.preview-pane > header small { margin-top:4px; color:var(--muted); }
.preview-pane iframe { display:block; width:100%; height:min(66vh,760px); border:0; background:white; }
.preview-pane-full iframe { height:calc(97vh - 205px); min-height:680px; }
.pdf-large-preview > header { flex-wrap:wrap; }
.pdf-preview-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.pdf-preview-actions label { display:flex; align-items:center; gap:5px; color:var(--muted); font-size:13px; font-weight:750; white-space:nowrap; }
.pdf-preview-actions input { width:58px; min-height:34px; padding:5px 7px; text-align:center; }
.pdf-preview-actions .translate-page-button { color:#52667b; border-color:#d7e0e7; background:#fff; box-shadow:none; }
.pdf-preview-actions .translate-page-button:hover { color:#17324d; border-color:#b9c6d1; background:#f7f9fb; }
.pdf-page-scroller { height:calc(97vh - 205px); min-height:680px; overflow:auto; padding:24px; scroll-behavior:smooth; scroll-padding-top:20px; background:#303236; }
.pdf-rendered-page { position:relative; width:min(100%,980px); min-height:1180px; margin:0 auto 24px; overflow:hidden; background:white; box-shadow:0 8px 24px rgba(0,0,0,.24); }
.pdf-rendered-page img { display:block; width:100%; height:auto; opacity:0; transition:opacity .18s ease; }
.pdf-rendered-page.loaded { min-height:0; }
.pdf-rendered-page.loaded img { opacity:1; }
.pdf-page-loading { position:absolute; inset:0; display:grid; place-items:center; color:#7e8b99; background:#f6f7f8; }
.pdf-rendered-page.loaded .pdf-page-loading { display:none; }
.pdf-rendered-page.load-error .pdf-page-loading { color:#a14b4b; background:#fff4f4; }
.pdf-rendered-page figcaption { position:absolute; right:12px; bottom:10px; padding:5px 9px; border-radius:7px; color:white; background:rgba(20,30,40,.68); font-size:12px; }
.page-translation-modal { width:min(1540px,calc(100vw - 24px)); max-height:97vh; background:#f5f7f9; transition:width .2s ease; }
.page-translation-modal.translation-only { width:min(1040px,calc(100vw - 24px)); }
.page-translation-body { overflow:hidden; padding:12px 18px 18px; color:#26384b; font-size:16px; line-height:1.9; }
.translation-view-switch { display:flex; justify-content:center; gap:4px; width:max-content; margin:0 auto 10px; padding:4px; border:1px solid #dce4e9; border-radius:11px; background:white; }
.translation-view-switch button { padding:7px 16px; border:0; border-radius:8px; color:#657586; background:transparent; font-size:13px; font-weight:800; cursor:pointer; }
.translation-view-switch button.active { color:#26394c; background:#edf1f4; }
.translation-compare-layout { display:grid; height:calc(97vh - 164px); min-height:620px; }
.translation-compare-layout.split { grid-template-columns:minmax(280px,var(--translation-original-width,50%)) 12px minmax(280px,1fr); gap:0; }
.translation-compare-layout.translation-only { display:block; }
.translation-original-pane,.translation-result-pane { min-width:0; min-height:0; overflow:auto; border:1px solid #dfe5e9; border-radius:14px; background:#fff; }
.translation-splitter { position:relative; z-index:4; width:12px; cursor:col-resize; touch-action:none; outline:none; }
.translation-splitter::before { content:''; position:absolute; inset:0 4px; border-radius:4px; background:#d8e0e6; transition:background .15s,box-shadow .15s; }
.translation-splitter span { position:absolute; left:50%; top:50%; width:4px; height:38px; border-top:2px solid #fff; border-bottom:2px solid #fff; transform:translate(-50%,-50%); pointer-events:none; }
.translation-splitter:hover::before,.translation-splitter:focus-visible::before,.translation-splitter.dragging::before { background:#8296a8; box-shadow:0 0 0 3px rgba(130,150,168,.16); }
.translation-original-pane { display:flex; flex-direction:column; background:#303236; }
.translation-original-pane > header { display:flex; align-items:center; justify-content:space-between; flex:0 0 auto; padding:11px 15px; color:#dce3e9; background:#27292c; }
.translation-original-pane > header small { color:#aeb8c1; }
.translation-original-pane > div { overflow:auto; padding:18px; }
.translation-original-pane img { display:block; width:min(100%,900px); height:auto; margin:0 auto; background:white; box-shadow:0 7px 22px rgba(0,0,0,.28); }
.translation-result-pane { position:relative; padding:14px 18px 34px; background:#f5f7f9; }
.translation-only .translation-original-pane { display:none; }
.translation-only .translation-result-pane { height:100%; border:0; }
.translation-reading-head { position:sticky; top:0; z-index:2; display:flex; align-items:center; justify-content:space-between; gap:18px; max-width:820px; margin:0 auto 14px; padding:14px 18px; border:1px solid #dfe6eb; border-radius:14px; background:rgba(255,255,255,.96); box-shadow:0 6px 18px rgba(32,51,70,.07); backdrop-filter:blur(8px); }
.translation-reading-head div { min-width:0; }
.translation-reading-head span { display:inline-block; margin-right:9px; color:#718096; font-size:11px; font-weight:850; letter-spacing:.08em; }
.translation-reading-head b { color:#24374a; font-size:16px; }
.translation-reading-head small { display:block; margin-top:3px; color:#7a8998; }
.translation-click-hint { max-width:820px; margin:0 auto 12px; padding:9px 13px; border-radius:10px; color:#557063; background:#edf6f3; font-size:13px; text-align:center; }
.translation-source-inspector { display:none; flex:0 0 auto; width:min(820px,100%); max-height:150px; overflow:auto; margin:0 auto 12px; padding:14px 17px; border:1px solid #b9d7cd; border-radius:13px; color:#354e59; background:#f7fbfa; box-shadow:0 6px 18px rgba(30,55,65,.08); }
.translation-source-inspector.has-source { display:block; }
.translation-source-inspector header { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.translation-source-inspector header div { display:flex; align-items:center; gap:12px; }
.translation-source-inspector span { color:#647789; font-size:11px; font-weight:850; letter-spacing:.05em; }
.translation-source-inspector b { color:#526578; font-size:13px; }
.translation-source-inspector p { margin:7px 0 0; font-family:Georgia,"Times New Roman",serif; font-size:14px; line-height:1.65; }
.translation-source-inspector button { width:28px; height:28px; flex:0 0 auto; border:0; border-radius:8px; color:#607383; background:#e8f1ee; font-size:20px; line-height:1; cursor:pointer; }
.translation-only .translation-result-pane { display:flex; flex-direction:column; overflow:hidden; }
.translation-only .translation-reading-head,.translation-only .translation-click-hint { flex:0 0 auto; width:100%; }
.translation-only .translation-reading-paper { flex:1 1 auto; width:100%; min-height:0; overflow:auto; }
.translation-only .page-translation-content p { display:block; }
.translation-reading-paper { max-width:820px; margin:0 auto; padding:42px 54px 58px; border:1px solid #e2e7eb; border-radius:16px; color:#20364b; background:white; box-shadow:0 12px 34px rgba(30,48,65,.08); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; font-size:16px !important; font-weight:400; line-height:1.85 !important; }
.page-translation-content article,.page-translation-content section,.page-translation-content div,.page-translation-content p,.page-translation-content li,.page-translation-content blockquote,.page-translation-content font,.page-translation-content span { font-family:inherit !important; font-size:inherit !important; line-height:inherit !important; }
.page-translation-content > :first-child { margin-top:0; }
.page-translation-content > :last-child { margin-bottom:0; }
.page-translation-content h1,.page-translation-content h2,.page-translation-content h3,.page-translation-content h4 { color:#15293e; font-family:inherit !important; font-weight:750; line-height:1.45 !important; }
.page-translation-content h1 { margin:0 0 22px; font-size:24px !important; }
.page-translation-content h2 { margin:30px 0 14px; padding-bottom:9px; border-bottom:1px solid #e4e9ed; font-size:21px !important; }
.page-translation-content h3 { margin:24px 0 10px; font-size:18px !important; }
.page-translation-content h4 { margin:20px 0 9px; font-size:16px !important; }
.page-translation-content p { margin:0 0 16px; text-align:justify; }
.page-translation-content ul,.page-translation-content ol { margin:10px 0 20px; padding-left:26px; }
.page-translation-content li { margin:6px 0; padding-left:3px; }
.page-translation-content strong { color:#162c43; }
.page-translation-content sup,.page-translation-content sub { font-size:.7em !important; line-height:0 !important; }
.page-translation-content sup { display:none !important; }
.page-translation-content .translation-segment { margin:0 -10px 4px; padding:6px 10px; border-radius:9px; cursor:pointer; transition:background .15s,box-shadow .15s; }
.page-translation-content .translation-segment:hover { background:#f3f7f8; box-shadow:inset 3px 0 #b7c8d1; }
.page-translation-content .translation-segment.source-active { background:#edf6f3; box-shadow:inset 3px 0 #5ba993; }
.page-translation-content .translation-sentence { border-radius:4px; cursor:pointer; transition:background .15s,box-shadow .15s; }
.page-translation-content .translation-sentence:hover { background:#eef5f3; box-shadow:0 0 0 3px #eef5f3; }
.page-translation-content .translation-sentence.source-active { background:#dff0eb; box-shadow:0 0 0 3px #dff0eb; }
.page-translation-content .translation-caption { margin:20px 0; padding:13px 16px; border-left:3px solid #aebdca; color:#607080; background:#f6f8fa; font-size:14px; }
.page-translation-content table { width:100%; margin:20px 0; border-collapse:collapse; font-size:14px; line-height:1.6; }
.page-translation-content th { color:#23384d; background:#f2f5f7; }
.page-translation-content th,.page-translation-content td { padding:10px 12px; border:1px solid #dbe2e7; text-align:left; vertical-align:top; }
.preview-empty { min-height:360px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; padding:30px; color:var(--muted); text-align:center; }
.ai-summary-notice { padding:16px 18px; border:1px solid #cfe9e2; border-radius:14px; background:linear-gradient(135deg,#f0fbf8,#f7fbff); }
.ai-summary-notice b { color:#16856f; }
.ai-summary-notice p { margin:7px 0 0; color:var(--muted); line-height:1.65; }
.upload-progress-card { display:flex; align-items:center; gap:14px; padding:16px 18px; border:1px solid #b8d8ff; border-radius:14px; background:#f2f7ff; }
.upload-progress-card b,.upload-progress-card p { display:block; margin:0; }
.upload-progress-card p { margin-top:4px; color:var(--muted); line-height:1.5; }
.upload-spinner { width:22px; height:22px; flex:0 0 auto; border:3px solid #cfe0ff; border-top-color:#246cef; border-radius:50%; animation:upload-spin .85s linear infinite; }
.upload-progress.complete .upload-spinner { border:0; animation:none; }
.upload-progress.complete .upload-spinner::before { content:'✓'; display:grid; place-items:center; width:22px; height:22px; border-radius:50%; color:white; background:#22ad7a; font-weight:900; }
.upload-progress.error .upload-progress-card { border-color:#f2b8b8; background:#fff5f5; }
.upload-progress.error .upload-spinner { border:0; animation:none; }
.upload-progress.error .upload-spinner::before { content:'!'; display:grid; place-items:center; width:22px; height:22px; border-radius:50%; color:white; background:#d95656; font-weight:900; }
@keyframes upload-spin { to { transform:rotate(360deg); } }
.product-preview-layout { display:grid; gap:18px; }
.ai-summary-card { padding:22px; border:1px solid #cfe9e2; border-radius:16px; background:linear-gradient(135deg,#f1fbf8,#f8fbff); }
.ai-summary-card h4 { margin:5px 0 10px; font-size:20px; }
.ai-summary-card p { margin:0; color:#42566a; line-height:1.9; white-space:pre-wrap; }
.ai-summary-card small { display:block; margin-top:12px; color:var(--muted); }
.product-file-preview iframe { height:min(58vh,680px); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.field.full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13px; font-weight: 750; margin-bottom: 7px; }
.field .hint { margin-top: 6px; color: var(--muted); font-size: 11px; }

.review-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); gap: 20px; }
.review-combined-modal { width:min(1180px,calc(100vw - 32px)); }
.review-metadata { min-width:0; }
.review-metadata-grid { margin-top:12px; }
.document-copy h3 { font-size: 21px; line-height: 1.45; margin: 8px 0; }
.document-copy p { color: #526273; line-height: 1.8; }
.meta-row { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13px; }
.suggestion-list { display: grid; gap: 12px; }
.suggestion-group { border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.suggestion-group header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.confidence { font-size: 11px; font-weight: 800; color: var(--green-dark); }
.ai-selected-overview { display:flex; flex-wrap:wrap; align-items:center; gap:5px; margin-top:7px; }
.ai-selected-overview > span { color:#6f8290; font-size:11px; font-weight:600; }
.ai-selected-overview > strong { padding:3px 8px; border:1px solid #91dcc6; border-radius:999px; color:var(--green-dark); background:#e9f9f3; font-size:11px; }
.ai-selected-overview.empty { color:#8b99a6; font-size:11px; font-weight:500; }
.check-list { display: flex; flex-wrap: wrap; gap: 8px; }
.check-pill input { display: none; }
.check-pill span { display: inline-flex; padding: 7px 10px; border-radius: 999px; background: #f1f4f5; color: #5b6773; border: 1px solid transparent; font-size: 12px; }
.check-pill input:checked + span { background: var(--green-soft); border-color: #9de1cd; color: var(--green-dark); font-weight: 700; }
.check-pill.ai-selected-pill span { box-shadow:0 0 0 2px rgba(18,168,128,.13); }
.tag-field-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(560px,100%),1fr)); grid-auto-flow:row dense; grid-auto-rows:8px; column-gap:18px; row-gap:18px; align-items:start; }
.tag-field-card { min-width:0; border:1px solid var(--line); border-radius:18px; padding:22px; background:#fff; box-shadow:0 8px 24px rgba(30,58,70,.035); }
.tag-field-card h3 { margin:0 0 5px; font-size:22px; }
.tag-field-card header { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; margin-bottom:12px; }
.tag-card-badges { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
.shared-tag-badge { color:#087c64; background:#e4f7f1; }
.option-row { display:grid; grid-template-columns:minmax(140px,28%) minmax(0,1fr) minmax(72px,auto); gap:18px; align-items:center; width:100%; min-height:64px; padding:12px 2px; border-top:1px solid var(--line); box-sizing:border-box; }
.option-row b { min-width:0; line-height:1.45; overflow-wrap:anywhere; }
.option-row small { min-width:0; color:var(--muted); line-height:1.55; }
.option-row .badge { justify-self:end; white-space:nowrap; }

.toast { position: fixed; right: 24px; bottom: 24px; z-index: 90; padding: 13px 18px; border-radius: 12px; color: white; background: #16383b; box-shadow: var(--shadow); transform: translateY(20px); opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translateY(0); }

/* Public app */
.app-page { min-height: 100vh; background: radial-gradient(circle at 15% 0, #edf9f6 0, transparent 34%), #f5f8f8; }
.app-header { background: rgba(255,255,255,.88); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 20; }
.app-header-inner { max-width: 1180px; margin: auto; padding: 18px 24px; display: flex; justify-content: space-between; align-items: center; }
.app-brand { display: flex; align-items: center; gap: 12px; }
.app-brand .brand-mark { color: white; }
.app-brand strong { display: block; font-size: 18px; }
.app-brand small { color: var(--muted); }
.admin-link { color: var(--green-dark); font-weight: 750; font-size: 14px; }
.app-main { max-width: 1180px; margin: auto; padding: 42px 24px 70px; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 26px; }
.hero h1 { font-size: clamp(30px, 5vw, 52px); margin: 8px 0 10px; letter-spacing: -.03em; }
.hero p { color: var(--muted); margin: 0; font-size: 16px; }
.result-counter { flex: none; padding: 16px 20px; border-radius: 16px; background: white; border: 1px solid var(--line); }
.result-counter b { color: var(--green); font-size: 26px; }
.filter-card { padding: 20px; background: white; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); margin-bottom: 24px; }
.public-search { display: flex; gap: 10px; margin-bottom: 16px; }
.public-search input { flex: 1; border: 1px solid #d9e1e5; border-radius: 14px; padding: 14px 16px; outline: none; }
.public-search input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(22,173,130,.1); }
.filters { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 10px; }
.filters select { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: #f9fbfb; color: var(--ink); }
.public-tag-multiselect { position:relative; min-width:0; }
.public-tag-multiselect > button { display:flex; align-items:center; justify-content:space-between; width:100%; padding:11px 12px; border:1px solid var(--line); border-radius:12px; color:var(--ink); background:#f9fbfb; cursor:pointer; }
.public-tag-filter-panel { position:absolute; z-index:25; top:48px; left:0; width:min(360px,calc(100vw - 48px)); max-height:440px; overflow:auto; padding:12px; border:1px solid var(--line); border-radius:14px; background:white; box-shadow:0 16px 38px rgba(24,53,65,.16); }
.public-tag-filter-panel > header { display:flex; align-items:center; justify-content:space-between; padding:2px 3px 10px; }
.public-tag-filter-panel > header button { border:0; color:var(--green-dark); background:transparent; cursor:pointer; }
.public-filter-category > summary > button { margin-left:auto; margin-right:8px; border:0; color:var(--green-dark); background:transparent; font-size:12px; cursor:pointer; }
.public-filter-category { margin:6px 0; border:1px solid #e4ecee; border-radius:10px; background:#fbfdfd; }
.public-filter-category > summary { display:flex; align-items:center; justify-content:space-between; padding:10px 11px; color:#304956; font-weight:700; cursor:pointer; list-style:none; }
.public-filter-category > summary::-webkit-details-marker { display:none; }
.public-filter-category > summary::before { content:'›'; margin-right:8px; color:var(--green); transition:transform .15s ease; }
.public-filter-category[open] > summary::before { transform:rotate(90deg); }
.public-filter-category > summary span { flex:1; }
.public-filter-category > summary small { color:var(--muted); font-weight:500; }
.public-filter-category > div { padding:0 7px 8px; }
.public-filter-category label { display:flex; align-items:center; gap:8px; padding:7px 5px; border-radius:7px; color:#4a5f6b; cursor:pointer; }
.public-filter-category label:hover { background:#eef8f5; }
.public-filter-category input { width:16px; height:16px; margin:0; accent-color:var(--green); }
.selected-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; min-height: 30px; flex-wrap: wrap; }
.selected-row .label { color: var(--muted); font-size: 13px; }
.selected-row button { border: 0; background: var(--green-soft); color: var(--green-dark); border-radius: 999px; padding: 6px 10px; }
.selected-row .clear { margin-left: auto; background: none; color: var(--muted); }
.results-head { display: flex; justify-content: space-between; align-items: center; margin: 26px 0 14px; }
.results-head h2 { margin: 0; font-size: 18px; }
.results-head select { border: 0; background: transparent; color: var(--muted); }
.literature-grid { display: grid; gap: 14px; }
.lit-card { display: grid; grid-template-columns: 1fr auto; gap: 20px; background: white; border: 1px solid var(--line); border-radius: 18px; padding: 22px; transition: .2s; }
.lit-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #c9e8df; }
.lit-card[data-detail] { cursor:pointer; }
.lit-card h3 { margin: 10px 0; font-size: 20px; line-height: 1.45; }
.lit-card .summary { color: #576777; line-height: 1.7; margin: 12px 0 0; }
.lit-card .open-button { align-self: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: white; color: var(--green-dark); font-size: 20px; }
.lit-card .study-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: 13px; margin-top: 12px; }
.empty { text-align: center; padding: 60px 20px; background: white; border: 1px dashed #cdd9dc; border-radius: 18px; color: var(--muted); }
.detail-modal .modal { width: min(760px, 100%); }
.detail-title { font-size: 26px; line-height: 1.45; margin: 12px 0; }
.detail-abstract { color: #475467; line-height: 1.85; padding: 18px; background: #f8fafb; border-radius: 14px; }
.detail-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:20px; }

/* Shared client navigation */
.with-bottom-nav { padding-bottom: 92px; }
.bottom-nav {
  position: fixed; left: 50%; bottom: 18px; z-index: 30; transform: translateX(-50%);
  width: min(720px, calc(100% - 32px)); height: 70px; display: grid; grid-template-columns: repeat(5, 1fr);
  border: 1px solid rgba(221,229,232,.9); border-radius: 22px; background: rgba(255,255,255,.94);
  box-shadow: 0 16px 45px rgba(25,55,70,.14); backdrop-filter: blur(20px); overflow: hidden;
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #718096; }
.bottom-nav a span { font-size: 20px; line-height: 1; }
.bottom-nav a b { font-size: 12px; }
.bottom-nav a.active { color: var(--green); background: linear-gradient(180deg, transparent, #f0fbf7); }
.bottom-nav a.disabled { opacity: .55; pointer-events: none; }
.header-search { width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; background: white; font-size: 28px; box-shadow: 0 8px 20px rgba(25,55,70,.08); }

/* Personal center */
.me-page { min-height: 100vh; padding-bottom: 118px; background: radial-gradient(circle at 82% 4%,rgba(74,193,164,.16),transparent 25%),linear-gradient(180deg,#f8fbfb,#f3f7f7); }
.me-shell { width: min(980px,100%); margin: auto; padding: 42px 28px 70px; }
.me-heading { position: relative; display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
.me-heading span { color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.me-heading h1 { margin: 6px 0 5px; font-size: clamp(34px,6vw,48px); letter-spacing: -.04em; }
.me-heading p { margin: 0; color: var(--muted); }
.me-settings-button { width: 46px; height: 46px; border: 1px solid rgba(219,229,231,.9); border-radius: 50%; color: #20354d; background: rgba(255,255,255,.82); font-size: 22px; box-shadow: 0 10px 28px rgba(23,53,67,.08); }
.profile-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 22px; min-height: 154px; padding: 30px 34px; border: 1px solid rgba(222,233,233,.9); border-radius: 24px; background: linear-gradient(110deg,rgba(255,255,255,.98),rgba(239,250,247,.9)); box-shadow: var(--shadow); }
.profile-hero::after { content: ''; position: absolute; right: -35px; top: -65px; width: 280px; height: 280px; border-radius: 50%; opacity: .42; background: radial-gradient(circle at 38% 38%,#63cbb3 0 6%,transparent 7%),radial-gradient(circle at 60% 62%,#bce9dd 0 18%,transparent 19%),radial-gradient(circle,#d8f3ec 0 2%,transparent 45%); }
.profile-hero > div { position: relative; z-index: 1; }
.profile-hero h2 { margin: 0 0 7px; font-size: 25px; }
.profile-hero p { margin: 0 0 8px; color: #627187; }
.profile-hero small { color: var(--green-dark); }
.profile-hero > button { position: relative; z-index: 1; align-self: end; padding: 9px 13px; border: 1px solid #cfe4df; border-radius: 10px; color: var(--green-dark); background: white; font-weight: 700; }
.me-stat-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin: 22px 0; }
.me-stat-card { position: relative; min-height: 188px; display: flex; flex-direction: column; align-items: flex-start; padding: 24px 20px; border: 1px solid rgba(224,232,235,.9); border-radius: 20px; text-align: left; background: white; box-shadow: 0 8px 28px rgba(25,55,70,.07); transition: transform .2s ease,box-shadow .2s ease; }
.me-stat-card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(25,55,70,.11); }
.me-stat-card > span { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 20px; border-radius: 17px; color: white; font-size: 27px; font-weight: 800; box-shadow: 0 9px 20px rgba(30,80,100,.16); }
.me-stat-card.mint > span { background: linear-gradient(145deg,#6bd2b9,#20a886); }
.me-stat-card.blue > span { background: linear-gradient(145deg,#79adff,#3977e8); }
.me-stat-card.amber > span { background: linear-gradient(145deg,#ffd36c,#f1a929); }
.me-stat-card.violet > span { background: linear-gradient(145deg,#b794f4,#7553ce); }
.me-stat-card b { font-size: 17px; }
.me-stat-card small { margin-top: 8px; color: var(--muted); line-height: 1.5; }
.me-stat-card small strong { color: inherit; }
.me-stat-card i { position: absolute; right: 18px; bottom: 18px; color: #6f7d8e; font-size: 24px; font-style: normal; }
.me-menu-card { overflow: hidden; border: 1px solid rgba(224,232,235,.9); border-radius: 22px; background: white; box-shadow: var(--shadow); }
.me-menu-card > button { width: calc(100% - 34px); min-height: 76px; display: grid; grid-template-columns: 40px 1fr auto auto; align-items: center; gap: 14px; margin: 0 17px; padding: 0 4px; border: 0; border-bottom: 1px solid #edf1f3; text-align: left; background: transparent; }
.me-menu-card > button:last-child { border-bottom: 0; }
.menu-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: white; background: linear-gradient(145deg,#59c5aa,#1f9e80); font-weight: 850; }
.me-menu-card b,.me-menu-card small { display: block; }
.me-menu-card small { margin-top: 4px; color: var(--muted); }
.me-menu-card i { color: #7c8999; font-size: 23px; font-style: normal; }
.me-menu-card em { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; color: white; background: #ee6259; font-size: 11px; font-style: normal; }
.me-drawer-backdrop { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: flex-end; background: rgba(17,34,47,.34); backdrop-filter: blur(4px); }
.me-drawer { width: min(510px,100%); height: 100%; overflow: auto; padding: 28px; background: #f7faf9; box-shadow: -20px 0 60px rgba(20,42,56,.18); animation: me-drawer-in .24s ease-out; }
@keyframes me-drawer-in { from { transform: translateX(30px); opacity: .4; } }
.me-drawer > header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.me-drawer header small { color: var(--green); font-weight: 800; letter-spacing: .1em; }
.me-drawer header h2 { margin: 5px 0 0; font-size: 28px; }
.me-drawer header button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: white; font-size: 25px; }
.me-drawer-content { padding-top: 18px; }
.me-content-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding: 17px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.me-content-item b,.me-content-item small { display: block; }
.me-content-item small { margin-top: 6px; color: var(--muted); }
.me-content-item > span { flex: none; padding: 5px 9px; border-radius: 999px; color: var(--green-dark); background: var(--green-soft); font-size: 11px; }
.me-empty { padding: 70px 20px; text-align: center; color: var(--muted); }
.me-empty span { display: block; margin-bottom: 12px; font-size: 40px; }
.me-empty b { color: #43546a; }
.me-empty p { font-size: 13px; }
.me-profile-form label { display: block; margin-bottom: 16px; color: #56687d; font-size: 13px; font-weight: 750; }
.me-profile-form input,.me-profile-form textarea,.me-help textarea { width: 100%; margin-top: 7px; padding: 12px 13px; border: 1px solid #dce5e8; border-radius: 12px; background: white; }
.me-profile-form button,.me-help button { width: 100%; padding: 13px; border: 0; border-radius: 12px; color: white; background: var(--green); font-weight: 800; }
.me-setting-list label { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 2px; border-bottom: 1px solid var(--line); }
.me-setting-list b,.me-setting-list small { display: block; }
.me-setting-list small { margin-top: 5px; color: var(--muted); }
.me-help p { padding: 15px; border-radius: 13px; background: white; color: #65758a; line-height: 1.65; }
.me-help textarea { margin: 10px 0; resize: vertical; }
.me-about { padding: 42px 14px; text-align: center; }
.about-mark { width: 74px; height: 74px; display: grid; place-items: center; margin: auto; border-radius: 22px; color: white; background: linear-gradient(145deg,#69d0b7,#159673); font-size: 24px; font-weight: 900; box-shadow: 0 14px 28px rgba(23,159,125,.23); }
.me-about h3 { font-size: 25px; }
.me-about p { color: #617187; line-height: 1.8; }
.me-about small { color: #96a2b1; }

/* Product center */
.product-center-page { min-height:100vh; padding-bottom:118px; background:linear-gradient(180deg,#fbfdfd,#f4f8f8); }
.product-center-shell { width:min(1020px,100%); margin:auto; padding:38px 28px 70px; }
.product-center-header { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:24px; }
.product-center-header > div { position:relative; padding-left:18px; }
.product-center-header > div > i { position:absolute; left:0; top:5px; width:5px; height:33px; border-radius:5px; background:var(--green); }
.product-center-header h1 { margin:0 0 5px; font-size:34px; }
.product-center-header p { margin:0; color:var(--muted); }
.product-center-header label { width:min(390px,43%); display:flex; align-items:center; gap:9px; padding:12px 16px; border:1px solid #dde7e9; border-radius:999px; background:white; }
.product-center-header label span { color:#6c7b8d; font-size:23px; }.product-center-header input { width:100%; border:0; outline:0; }
.health-manager-hero { position:relative; overflow:hidden; min-height:310px; display:grid; grid-template-columns:1.35fr .65fr; align-items:center; padding:42px 48px; border:1px solid #cfe8e5; border-radius:23px; background:radial-gradient(circle at 75% 35%,rgba(133,173,255,.38),transparent 37%),linear-gradient(120deg,#eafbf6,#eff6ff 70%,#dfeaff); box-shadow:var(--shadow); }
.health-manager-hero::before { content:''; position:absolute; inset:0; opacity:.32; background-image:radial-gradient(#62b9aa 1.2px,transparent 1.2px); background-size:28px 28px; mask-image:linear-gradient(90deg,transparent 20%,#000); }
.health-manager-hero > div:first-child { position:relative; z-index:2; }.health-manager-hero > div:first-child > span { color:#168e75; font-size:11px; font-weight:850; letter-spacing:.12em; }
.health-manager-hero h2 { margin:7px 0 10px; color:#083e66; font-size:clamp(36px,6vw,58px); letter-spacing:-.05em; }.health-manager-hero p { margin:0; color:#40556f; font-size:17px; }
.health-manager-hero > div:first-child > div { display:flex; gap:10px; margin-top:28px; }.health-manager-hero a { padding:13px 20px; border-radius:999px; color:white; background:linear-gradient(135deg,#19b394,#079a9d); font-weight:800; box-shadow:0 9px 20px rgba(12,159,145,.18); }.health-manager-hero a.outline { color:#1263bb; border:1px solid #2f7ee6; background:rgba(255,255,255,.78); box-shadow:none; }
.health-bot { position:relative; z-index:1; width:210px; height:230px; justify-self:end; }.bot-head { position:absolute; top:8px; left:45px; width:120px; height:102px; border:11px solid #eaf2ff; border-radius:45% 45% 42% 42%; background:linear-gradient(145deg,#0b3760,#0f73a1); box-shadow:0 13px 30px rgba(35,93,151,.24); }.bot-head::before,.bot-head::after { content:''; position:absolute; top:37px; width:13px; height:22px; border-radius:50%; background:#92f7ff; }.bot-head::before { left:27px; }.bot-head::after { right:27px; }.bot-head b { position:absolute; left:49px; top:58px; width:20px; height:10px; border-bottom:3px solid #b9fbff; border-radius:50%; }.bot-body { position:absolute; left:62px; bottom:20px; width:92px; height:105px; display:grid; place-items:center; border-radius:45px 45px 30px 30px; color:#fff; background:linear-gradient(145deg,#eff7ff,#8fbbf7); font-size:36px; font-weight:900; }.health-report-icon { position:absolute; right:0; bottom:10px; width:72px; height:96px; display:grid; place-items:center; border:7px solid #dceaff; border-radius:13px; color:#2f7ee6; background:rgba(255,255,255,.72); font-size:36px; }
.product-family-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin:26px 0; }.family-card { overflow:hidden; min-height:330px; display:flex; flex-direction:column; border:1px solid #dfe8eb; border-radius:19px; background:white; box-shadow:0 8px 28px rgba(25,55,70,.07); }.family-card header { display:flex; align-items:center; gap:11px; padding:22px 22px 0; }.family-card header span { width:47px; height:47px; display:grid; place-items:center; border-radius:50%; color:white; background:#23ad8d; font-size:25px; }.family-card h2 { margin:0; color:#11896f; font-size:24px; }.family-card p { margin:12px 22px 0; color:#56687c; }.family-card strong { padding:15px; text-align:center; color:#138c74; border-top:1px solid #edf1f2; }.family-card.fgn header span { background:#398ce4; }.family-card.fgn h2,.family-card.fgn strong { color:#1769c8; }.family-card.fgt header span { background:#6a6bd0; }.family-card.fgt h2,.family-card.fgt strong { color:#5552b7; }
.family-visual { position:relative; flex:1; min-height:155px; margin-top:14px; overflow:hidden; background:linear-gradient(180deg,rgba(238,250,247,.35),#e9f7f3); }.family-visual.lab i { position:absolute; bottom:18px; width:18px; height:105px; border:3px solid #85d5c6; border-radius:4px 4px 9px 9px; background:linear-gradient(transparent 50%,#8fe1d0 51%); }.family-visual.lab i:nth-child(1){left:28px}.family-visual.lab i:nth-child(2){left:55px;height:125px}.family-visual.lab i:nth-child(3){left:82px;height:88px}.family-visual.lab b { position:absolute; right:24px; bottom:16px; width:96px; height:75px; border-radius:8px; background:linear-gradient(145deg,#dce9ee,#8bb8c7); box-shadow:-8px 10px 0 #d7eef0; }.family-visual.molecule { background:radial-gradient(circle at center,#d7efff,transparent 53%),#f4faff; }.family-visual.molecule i { position:absolute; width:24px; height:24px; border-radius:50%; background:#65aee8; box-shadow:0 4px 10px #9cccea; }.family-visual.molecule i:nth-child(1){left:22%;top:55%}.family-visual.molecule i:nth-child(2){left:45%;top:25%}.family-visual.molecule i:nth-child(3){left:64%;top:60%}.family-visual.molecule i:nth-child(4){left:42%;top:75%}.family-visual.molecule b { position:absolute; left:26%; top:38%; width:43%; height:3px; background:#72aee0; transform:rotate(18deg); box-shadow:35px 46px 0 #72aee0,-3px 48px 0 #72aee0; }.family-visual.gut { display:grid; place-items:center; background:radial-gradient(circle,#eceaff,#f6f5ff); }.family-visual.gut span { color:#8c80dd; font-size:130px; line-height:1; transform:rotate(90deg); text-shadow:0 8px 25px rgba(110,93,207,.2); }
.materials-entry { position:relative; overflow:hidden; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:22px; padding:28px 30px; border:1px solid #d5e9e5; border-radius:20px; background:linear-gradient(120deg,#fff,#f2fbf8); box-shadow:0 7px 24px rgba(25,55,70,.06); }.materials-entry > i { position:absolute; right:-15px; bottom:-45px; width:180px; height:140px; border:16px double #9bdbcf; border-radius:24px; opacity:.22; transform:rotate(12deg); }.materials-icon { width:70px; height:82px; display:grid; place-items:center; border:5px solid #4ab8a3; border-radius:13px; color:#35a992; font-size:37px; }.materials-entry h2 { margin:0 0 7px; font-size:30px; }.materials-entry p { margin:0; color:#5d6c7d; }.materials-entry div div { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }.materials-entry div div span { padding:6px 10px; border:1px solid #dce8e9; border-radius:8px; color:#526379; background:white; font-size:12px; }.materials-entry strong { align-self:start; z-index:1; color:#119278; }
.solutions-section { margin-top:28px; }.solutions-section > header { display:flex; align-items:center; justify-content:space-between; }.solutions-section h2 { margin:0; font-size:25px; }.solutions-section h2 span { color:var(--green); }.solutions-section small { color:#68778b; }.solution-scroller { display:flex; gap:14px; margin:15px -2px 0; padding:2px 2px 14px; overflow-x:auto; scrollbar-width:none; scroll-snap-type:x mandatory; }.solution-scroller::-webkit-scrollbar{display:none}.solution-card { flex:0 0 215px; overflow:hidden; border:1px solid #e0e7e9; border-radius:17px; background:white; box-shadow:0 7px 20px rgba(25,55,70,.06); scroll-snap-align:start; }.solution-card > div { height:128px; display:grid; place-items:center; background:linear-gradient(145deg,#dff5e9,#97d3b1); }.solution-card > div span { color:white; font-size:70px; text-shadow:0 7px 17px rgba(20,90,70,.18); }.solution-card.sleep > div{background:linear-gradient(145deg,#e8efff,#829fe9)}.solution-card.metabolic > div{background:linear-gradient(145deg,#ffe8cb,#ed9c52)}.solution-card.immune > div{background:linear-gradient(145deg,#e8f7ec,#91cda2)}.solution-card.ibs-c > div{background:linear-gradient(145deg,#eeeafa,#aa9adc)}.solution-card h3 { margin:14px 15px 6px; }.solution-card p { min-height:56px; margin:0 15px 17px; color:#6b7889; font-size:12px; line-height:1.55; }.scroll-indicator { width:80px; height:4px; margin:2px auto 0; overflow:hidden; border-radius:5px; background:#e6ecee; }.scroll-indicator i { display:block; width:32px; height:100%; border-radius:5px; background:var(--green); transition:.1s; }

/* Product subpages */
.product-subpage,.materials-page,.health-manager-page { min-height:100vh; background:#f5f8f8; }.subpage-header { position:sticky; top:0; z-index:30; min-height:76px; display:grid; grid-template-columns:48px 1fr auto; align-items:center; gap:14px; padding:12px max(24px,calc((100% - 1000px)/2)); border-bottom:1px solid var(--line); background:rgba(255,255,255,.94); backdrop-filter:blur(18px); }.subpage-header > a:first-child { width:42px; height:42px; display:grid; place-items:center; border:1px solid var(--line); border-radius:50%; background:white; font-size:30px; }.subpage-header div span { color:var(--green); font-size:10px; font-weight:850; letter-spacing:.1em; }.subpage-header h1 { margin:2px 0 0; font-size:20px; }.subpage-text-link,.subpage-header > small { color:var(--green-dark); font-weight:750; }
.product-detail-shell,.materials-shell,.health-manager-shell { width:min(1000px,100%); margin:auto; padding:30px 24px 70px; }.detail-product-hero { min-height:300px; display:grid; grid-template-columns:1.35fr .65fr; align-items:center; padding:42px; border-radius:23px; color:#123147; background:linear-gradient(135deg,#e9faf5,#eef7ff); box-shadow:var(--shadow); }.detail-product-hero[data-product=fgn]{background:linear-gradient(135deg,#eef7ff,#f4faff)}.detail-product-hero[data-product=fgt]{background:linear-gradient(135deg,#f4f1ff,#eef5ff)}.detail-product-hero span { color:var(--green); font-size:11px; font-weight:850; letter-spacing:.1em; }.detail-product-hero h2 { margin:8px 0 12px; font-size:clamp(32px,5vw,50px); }.detail-product-hero p { max-width:590px; color:#607086; line-height:1.8; }.detail-product-hero a { display:inline-block; margin-top:17px; padding:12px 19px; border-radius:12px; color:white; background:var(--green); font-weight:800; }.detail-symbol { justify-self:center; color:#44bda0; font-size:145px; }.detail-tabs { display:flex; gap:8px; margin:22px 0; overflow:auto; }.detail-tabs button { flex:1; min-width:110px; padding:11px; border:1px solid var(--line); border-radius:11px; color:#68778b; background:white; }.detail-tabs button.active { color:white; border-color:var(--green); background:var(--green); }.detail-content-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:15px; }.detail-content-grid article { padding:24px; border:1px solid var(--line); border-radius:17px; background:white; box-shadow:0 7px 22px rgba(25,55,70,.05); }.detail-content-grid article > span { color:#9bcfc3; font-size:12px; font-weight:800; }.detail-content-grid h3 { margin:10px 0; }.detail-content-grid p { color:#68788d; line-height:1.7; }.detail-content-grid a { color:var(--green-dark); font-weight:750; }.detail-safety { margin-top:18px; padding:18px 20px; border-radius:14px; color:#745f35; background:#fff9e9; }.detail-safety p { margin:6px 0 0; line-height:1.6; }
.materials-search { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:10px; padding:12px 14px; border:1px solid var(--line); border-radius:15px; background:white; box-shadow:var(--shadow); }.materials-search span { font-size:22px; }.materials-search input { border:0; outline:0; }.materials-search button { padding:9px 15px; border:0; border-radius:9px; color:white; background:var(--green); }.materials-filter-row,.materials-product-row { display:flex; gap:9px; margin-top:17px; overflow:auto; }.materials-filter-row button,.materials-product-row button { flex:none; padding:9px 13px; border:1px solid var(--line); border-radius:999px; color:#65758a; background:white; }.materials-filter-row button.active,.materials-product-row button.active { color:white; border-color:var(--green); background:var(--green); }.materials-product-row { margin-top:10px; }.materials-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:15px; margin-top:20px; }.material-card { padding:22px; border:1px solid var(--line); border-radius:17px; background:white; box-shadow:0 7px 22px rgba(25,55,70,.05); }.material-card header { display:flex; justify-content:space-between; }.material-card header span { color:var(--green-dark); font-weight:850; }.material-card header small { color:var(--muted); }.material-card h2 { font-size:19px; }.material-card p { color:#6b7a8d; line-height:1.65; }.material-card div { display:flex; flex-wrap:wrap; gap:6px; }.material-card i { padding:5px 8px; border-radius:7px; color:#49667d; background:#f0f5f6; font-size:11px; font-style:normal; }.material-card button { margin-top:17px; padding:0; border:0; color:var(--green-dark); background:none; font-weight:800; }
.materials-tag-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:17px; }.materials-filter-group { display:grid; grid-template-columns:86px minmax(0,1fr); align-items:center; gap:10px; }.materials-filter-group > b { color:#506477; font-size:13px; }.materials-filter-group select { width:100%; min-width:0; padding:11px 36px 11px 13px; border:1px solid var(--line); border-radius:12px; color:#516579; background:white; outline:none; }.materials-filter-group select:focus { border-color:var(--green); box-shadow:0 0 0 3px rgba(24,174,141,.1); }.solution-empty { min-width:320px; padding:30px; border:1px dashed var(--line); border-radius:17px; color:#66788a; background:white; }.solution-empty p { margin:7px 0 0; }.solution-detail-shell { width:min(1000px,100%); margin:auto; padding:28px 24px 70px; }.solution-html-content { padding:clamp(20px,4vw,48px); border:1px solid var(--line); border-radius:20px; background:white; box-shadow:var(--shadow); line-height:1.8; }.solution-html-content img { max-width:100%; height:auto; }.solution-html-content table { width:100%; border-collapse:collapse; }.solution-html-content th,.solution-html-content td { padding:10px; border:1px solid var(--line); }
.solution-html-frame { width:100%; height:calc(100vh - 150px); min-height:680px; border:1px solid var(--line); border-radius:20px; background:white; box-shadow:var(--shadow); }
.literature-reader-page { min-height:100vh; background:#f4f7f8; }.reader-header { position:sticky; top:0; z-index:20; display:grid; grid-template-columns:48px minmax(0,1fr); gap:14px; align-items:center; padding:14px max(20px,calc((100% - 1400px)/2)); border-bottom:1px solid var(--line); background:rgba(255,255,255,.96); backdrop-filter:blur(16px); }.reader-header > a { width:42px; height:42px; display:grid; place-items:center; border:1px solid var(--line); border-radius:50%; background:white; font-size:30px; }.reader-header span { color:var(--green); font-size:11px; font-weight:850; }.reader-header h1 { overflow:hidden; margin:2px 0; font-size:20px; text-overflow:ellipsis; white-space:nowrap; }.reader-header small { display:block; overflow:hidden; color:var(--muted); text-overflow:ellipsis; white-space:nowrap; }.reader-shell { width:min(1400px,100%); margin:auto; padding:18px 20px 48px; }.reader-tabs { display:flex; gap:8px; margin-bottom:12px; }.reader-tabs button { padding:10px 18px; border:1px solid var(--line); border-radius:10px; color:#617486; background:white; font-weight:800; }.reader-tabs button.active { color:white; border-color:var(--green); background:var(--green); }.reader-tabs button:disabled { opacity:.45; }.quick-read-large-frame { width:100%; height:calc(100vh - 210px); min-height:680px; border:0; background:white; }
.manager-mode-tabs { display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:6px; border-radius:14px; background:#e8efef; }.manager-mode-tabs button { padding:12px; border:0; border-radius:10px; color:#637489; background:transparent; font-weight:800; }.manager-mode-tabs button.active { color:var(--green-dark); background:white; box-shadow:0 4px 14px rgba(25,55,70,.09); }.manager-intro { display:flex; align-items:center; gap:15px; margin:22px 0; padding:22px; border:1px solid #d8e9e6; border-radius:17px; background:linear-gradient(130deg,#f0fbf7,#eef7ff); }.manager-mini-bot { width:58px; height:58px; display:grid; place-items:center; flex:none; border-radius:18px; color:white; background:linear-gradient(145deg,#32b79b,#3989e8); font-size:25px; }.manager-intro h2 { margin:0 0 6px; }.manager-intro p { margin:0; color:#69798c; }.manager-form { padding:25px; border:1px solid var(--line); border-radius:19px; background:white; box-shadow:var(--shadow); }.manager-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }.manager-form label { display:block; color:#56697e; font-size:13px; font-weight:750; }.manager-form label.full { grid-column:1/-1; }.manager-form select,.manager-form textarea { width:100%; margin-top:7px; padding:12px; border:1px solid #dce5e8; border-radius:11px; resize:vertical; }.manager-submit { width:100%; margin-top:20px; padding:14px; border:0; border-radius:12px; color:white; background:linear-gradient(135deg,#19ae8e,#2583da); font-weight:850; }.manager-upload { min-height:180px; display:grid!important; place-items:center; align-content:center; gap:5px; border:1px dashed #8dbfb4; border-radius:15px; text-align:center; background:#f5fbf9; }.manager-upload > span { color:var(--green); font-size:37px; }.manager-upload input { display:none; }.manager-loading { display:flex; align-items:center; gap:13px; margin-top:18px; padding:18px; border-radius:14px; color:#31587f; background:#edf6ff; }.manager-loading i { width:23px; height:23px; border:3px solid #bed7f4; border-top-color:#2f7ee6; border-radius:50%; animation:processing-spin .8s linear infinite; }.manager-loading b,.manager-loading small { display:block; }.manager-loading small { margin-top:4px; color:#71859a; }.manager-result { margin-top:20px; padding:24px; border:1px solid var(--line); border-radius:18px; background:white; }.manager-result header { color:var(--green-dark); }.manager-result p { line-height:1.8; }.manager-disclaimer { padding:18px; color:#7d6d45; background:#fff9e9; border-radius:13px; font-size:12px; line-height:1.6; }

/* Home */
.home-page { padding-bottom: 110px; }
.home-main { max-width: 1080px; margin: auto; padding: 42px 24px 70px; }
.home-intro { margin-bottom: 24px; }
.home-intro > span { color: var(--green-dark); font-size: 12px; font-weight: 850; letter-spacing: .12em; }
.home-intro h1 { margin: 8px 0; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.04em; }
.home-intro p { margin: 0; color: var(--muted); }
.report-stack { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.home-report { min-height: 390px; position: relative; overflow: hidden; border-radius: 28px; padding: 38px; box-shadow: var(--shadow); }
.research-report { background: linear-gradient(135deg, #e9fbf6 0%, #c9f0e8 55%, #8bdac9 100%); }
.news-report { background: linear-gradient(135deg, #f4f9ff 0%, #d9ebfb 52%, #9dc9eb 100%); }
.report-content { position: relative; z-index: 2; width: 72%; }
.report-kicker { display: inline-block; color: var(--green-dark); font-size: 12px; font-weight: 850; letter-spacing: .08em; margin-bottom: 14px; }
.news-report .report-kicker { color: #216caa; }
.home-report h2 { font-size: clamp(27px, 3vw, 38px); line-height: 1.2; margin: 0 0 10px; }
.home-report p { color: #536677; font-size: 15px; line-height: 1.7; min-height: 50px; }
.report-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0 28px; }
.report-tags span { padding: 7px 11px; border-radius: 999px; background: rgba(255,255,255,.72); color: var(--green-dark); font-size: 12px; font-weight: 700; }
.news-report .report-tags span { color: #226ca9; }
.home-report a { display: inline-flex; align-items: center; gap: 16px; padding: 12px 18px; border-radius: 14px; color: white; background: var(--green); font-weight: 750; }
.news-report a { background: #3b91d5; }
.home-report a b { font-size: 22px; }
.home-report .report-content > small { display: block; color: #637788; margin-top: 15px; }
.report-orb { position: absolute; z-index: 1; width: 270px; height: 270px; right: -72px; bottom: -28px; border-radius: 50%; border: 1px solid rgba(255,255,255,.8); background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.95), rgba(31,177,141,.25) 35%, rgba(11,118,102,.36) 75%, rgba(255,255,255,.2)); box-shadow: inset 0 0 40px rgba(255,255,255,.8), 0 20px 60px rgba(23,100,97,.15); }
.news-report .report-orb { background: radial-gradient(circle at 35% 30%, white, rgba(83,165,221,.3) 35%, rgba(29,91,145,.4) 75%, rgba(255,255,255,.2)); }
.report-orb i { position: absolute; width: 60px; height: 22px; border-radius: 999px; background: rgba(17,164,130,.55); box-shadow: inset 0 0 10px rgba(255,255,255,.7); transform: rotate(35deg); }
.report-orb i:nth-child(1) { top: 52px; left: 36px; }
.report-orb i:nth-child(2) { top: 110px; left: 135px; transform: rotate(-20deg); }
.report-orb i:nth-child(3) { bottom: 65px; left: 56px; transform: rotate(12deg); }
.news-report .report-orb i { background: rgba(40,111,169,.38); width: 1px; height: 100%; top: 0; left: 50%; border-radius: 0; }
.news-report .report-orb i:nth-child(2) { transform: rotate(60deg); }
.news-report .report-orb i:nth-child(3) { transform: rotate(-60deg); }
.report-orb span { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); color: rgba(17,60,69,.35); font-size: 11px; letter-spacing: .14em; }
.archive-section { margin-top: 28px; padding: 28px; border: 1px solid #dfe9e8; border-radius: 26px; background: linear-gradient(145deg,#fff 0%,#f8fbfa 100%); box-shadow: 0 10px 28px rgba(25,55,70,.06); }
.archive-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:20px; }
.archive-kicker { display:block; margin-bottom:5px; color:var(--green-dark); font-size:10px; font-weight:850; letter-spacing:.15em; }
.archive-heading h2 { margin:0; font-size:25px; letter-spacing:-.02em; }
.archive-heading p { margin:6px 0 0; color:var(--muted); font-size:13px; }
.archive-heading > a { display:flex; align-items:center; gap:8px; flex:none; color:#527080; font-size:13px; font-weight:750; }
.archive-heading > a span { width:28px; height:28px; display:grid; place-items:center; border:1px solid #d8e5e2; border-radius:50%; color:var(--green-dark); background:white; transition:.2s; }
.archive-heading > a:hover span { color:white; border-color:var(--green); background:var(--green); transform:translateX(2px); }
.mobile-home-copy,.mobile-report-title,.archive-open,.bottom-nav a span img,.ai-halo { display:none; }
.header-search img,.header-search span { display:none; }
.header-search::before { content:'⌕'; }
.archive-kicker i { font-style:normal; }
.bottom-nav .desktop-nav-icon { font-style:normal; }
.desktop-archive-link { display:flex; align-items:center; gap:8px; flex:none; color:#527080; font-size:13px; font-weight:750; }
.desktop-archive-link > span { width:28px; height:28px; display:grid; place-items:center; border:1px solid #d8e5e2; border-radius:50%; color:var(--green-dark); background:white; }
.archive-open { align-items:center; gap:8px; flex:none; padding:0; border:0; color:#527080; background:transparent; font:inherit; cursor:pointer; }
.archive-open small { color:var(--green-dark); font-size:10px; font-weight:800; letter-spacing:.08em; }
.archive-open span { font-size:13px; font-weight:750; }
.archive-open b { width:28px; height:28px; display:grid; place-items:center; border:1px solid #d8e5e2; border-radius:50%; color:var(--green-dark); background:white; }
.archive-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:14px; }
.archive-card { min-width:0; display:flex; flex-direction:column; min-height:205px; padding:20px; border:1px solid #e1eae9; border-radius:19px; background:white; box-shadow:0 5px 16px rgba(28,64,74,.04); transition:transform .2s,box-shadow .2s,border-color .2s; }
.archive-card:hover { transform:translateY(-3px); border-color:#b9ddd4; box-shadow:0 12px 25px rgba(28,64,74,.09); }
.archive-card-top,.archive-card-bottom { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.archive-type { display:inline-flex; align-items:center; gap:7px; color:var(--green-dark); font-size:12px; font-weight:800; }
.archive-type i { width:26px; height:26px; display:grid; place-items:center; border-radius:8px; color:white; background:linear-gradient(145deg,#27b795,#119373); font-size:11px; font-style:normal; }
.archive-news .archive-type { color:#2877b5; }
.archive-news .archive-type i { background:linear-gradient(145deg,#55a7e3,#337fc2); }
.archive-card time { color:#96a4ad; font-size:11px; }
.archive-card h3 { margin:18px 0 8px; overflow:hidden; font-size:18px; line-height:1.35; text-overflow:ellipsis; white-space:nowrap; }
.archive-card p { display:-webkit-box; min-height:42px; margin:0 0 20px; overflow:hidden; color:#66798a; font-size:13px; line-height:1.65; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.archive-card-bottom { margin-top:auto; }
.archive-card-bottom > span { display:flex; min-width:0; gap:5px; overflow:hidden; }
.archive-card-bottom em { flex:none; padding:5px 8px; border-radius:999px; color:#537064; background:#eef7f4; font-size:10px; font-style:normal; }
.archive-news .archive-card-bottom em { color:#52718d; background:#eef5fb; }
.archive-card-bottom b { width:32px; height:32px; display:grid; place-items:center; flex:none; border-radius:50%; color:var(--green-dark); background:#e9f7f3; font-size:16px; }
.archive-news .archive-card-bottom b { color:#337fc2; background:#edf5fc; }
.archive-empty,.archive-loading { grid-column:1/-1; padding:34px; border:1px dashed #d6e3e0; border-radius:17px; color:var(--muted); text-align:center; }
.archive-empty b,.archive-empty span { display:block; }
.archive-empty b { margin-bottom:6px; color:var(--ink); }
.home-loading { grid-column: 1/-1; padding: 60px; text-align: center; color: var(--muted); }

/* Report reader */
.report-reader-page { margin: 0; background: #f1f5f6; }
.reader-header { height: 70px; position: sticky; top: 0; z-index: 10; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 0 24px; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); backdrop-filter: blur(18px); }
.reader-header button { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: white; font-size: 28px; }
.reader-header b, .reader-header small { display: block; }
.reader-header small { color: var(--muted); margin-top: 2px; }
.reader-header a { color: var(--green-dark); font-weight: 750; }
.reader-shell { max-width: 920px; margin: 24px auto; padding: 0 20px; }
.reader-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.reader-tags span { padding: 6px 10px; border-radius: 999px; color: var(--green-dark); background: var(--green-soft); font-size: 12px; font-weight: 700; }
#reportFrame { width: 100%; min-height: calc(100vh - 130px); border: 0; border-radius: 18px; background: white; box-shadow: var(--shadow); }

/* Home content admin */
.report-admin-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.report-editor { border: 1px solid var(--line); border-radius: 18px; background: white; overflow: hidden; }
.report-editor header { padding: 18px 20px; background: linear-gradient(135deg, #f5fbf9, #edf8f5); border-bottom: 1px solid var(--line); }
.report-editor.news-editor header { background: linear-gradient(135deg, #f5f9fd, #edf5fb); }
.report-editor header h3 { margin: 4px 0; }
.report-editor-body { padding: 20px; display: grid; gap: 14px; }
.file-drop { display: block; padding: 20px; border: 1px dashed #a9c9c1; border-radius: 14px; text-align: center; background: #f8fcfb; color: var(--green-dark); }
.file-drop input { display: none; }
.html-preview { height: 150px; padding: 12px; overflow: auto; white-space: pre-wrap; border: 1px solid var(--line); border-radius: 12px; background: #fafcfc; color: var(--muted); font: 12px/1.5 ui-monospace, monospace; }
.focus-admin { margin-top: 20px; }
.focus-edit-row { display: flex; gap: 10px; flex-wrap: wrap; }
.focus-edit-row input { width: 150px; border: 1px solid #d9e1e5; border-radius: 12px; padding: 11px 12px; }
.candidate-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.candidate-list button { border: 1px solid var(--line); background: #f8fafb; border-radius: 999px; padding: 7px 10px; color: #536273; }

/* AI assistant */
.assistant-page { padding-bottom: 108px; background: radial-gradient(circle at 10% 0, #edf3ff 0, transparent 32%), radial-gradient(circle at 95% 20%, #eafaf6 0, transparent 28%), #f7f9fc; }
.assistant-mark { font-size: 14px; background: linear-gradient(135deg, #3978f6, #2458db); }
.assistant-main { max-width: 1120px; margin: auto; padding: 34px 24px 80px; }
.assistant-hero { min-height: 245px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; padding: 42px 48px; border-radius: 26px; background: linear-gradient(135deg, #eef4ff 0%, #f7fbff 55%, #e7f7f5 100%); border: 1px solid #e2eafd; box-shadow: 0 12px 36px rgba(48,86,160,.08); }
.assistant-hero > div:first-child { position: relative; z-index: 2; }
.assistant-hero span { color: #3267df; font-size: 12px; font-weight: 850; letter-spacing: .12em; }
.assistant-hero h1 { margin: 10px 0; font-size: clamp(30px, 4vw, 46px); letter-spacing: -.04em; color: #163369; }
.assistant-hero p { margin: 0; color: #60708b; }
.ai-visual { position: relative; width: 280px; height: 180px; display: grid; place-items: center; }
.ai-visual b { position: relative; z-index: 2; font-size: 82px; color: #78aaf9; text-shadow: 0 10px 28px rgba(56,111,230,.25); }
.ai-visual::before, .ai-visual::after { content: ''; position: absolute; left: 50%; transform: translateX(-50%); border-radius: 50%; }
.ai-visual::before { width: 210px; height: 72px; bottom: 10px; background: linear-gradient(180deg, #b9d5ff, #4e82ed); box-shadow: 0 18px 35px rgba(49,103,218,.26), inset 0 6px 12px rgba(255,255,255,.8); }
.ai-visual::after { width: 120px; height: 40px; bottom: 27px; background: radial-gradient(circle, white, #7caaf8); }
.ai-visual i { position: absolute; width: 54px; height: 54px; border-radius: 14px; background: rgba(255,255,255,.72); border: 1px solid white; box-shadow: 0 10px 30px rgba(56,100,183,.12); }
.ai-visual i:nth-child(2) { left: 0; top: 55px; transform: rotate(-8deg); }
.ai-visual i:nth-child(3) { right: 0; top: 42px; transform: rotate(8deg); }
.ai-visual i:nth-child(4) { right: 32px; bottom: 6px; }
.mode-section { margin-top: 26px; }
.mode-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; }
.mode-heading span { width: 4px; height: 18px; border-radius: 4px; background: #336cf0; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mode-card { min-height: 150px; display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 18px; padding: 24px; text-align: left; border-radius: 20px; border: 1px solid #dfe7fb; background: linear-gradient(135deg, #f7faff, #eef4ff); color: var(--ink); transition: .2s; }
.mode-card.product { border-color: #d5eee8; background: linear-gradient(135deg, #f7fcfb, #edf9f5); }
.mode-card.active { border-color: #7fa7ff; box-shadow: 0 10px 30px rgba(47,103,231,.12); transform: translateY(-2px); }
.mode-card.product.active { border-color: #61c9ad; box-shadow: 0 10px 30px rgba(25,160,126,.12); }
.mode-icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 17px; color: white; background: linear-gradient(145deg, #5a91ff, #215be3); font-size: 30px; box-shadow: 0 10px 22px rgba(40,96,225,.22); }
.product .mode-icon { background: linear-gradient(145deg, #65ddbf, #159b79); box-shadow: 0 10px 22px rgba(22,156,120,.2); }
.mode-card h2 { margin: 0 0 6px; font-size: 19px; color: #2252b8; }
.mode-card.product h2 { color: #138467; }
.mode-card p { margin: 0 0 10px; color: #5f6f82; font-size: 13px; }
.mode-card small { color: #7791c5; }
.mode-card.product small { color: #6cae9d; }
.mode-card > b { font-size: 26px; color: #346be9; }
.assistant-grid { display: grid; grid-template-columns: 1fr 300px; gap: 18px; margin-top: 22px; }
.question-panel, .recent-panel { background: white; border: 1px solid var(--line); border-radius: 20px; padding: 20px; }
.suggestion-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.suggestion-header > div { display: flex; gap: 8px; }
.suggestion-header button { border: 0; background: none; color: var(--muted); }
.suggestion-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.suggestion-columns h3 { margin: 0 0 10px; padding-left: 10px; border-left: 3px solid #3975ed; font-size: 14px; color: #2d5cbd; }
.suggestion-columns > div:last-child h3 { border-color: #27ad87; color: #158166; }
.suggestion-columns > div > div { display: grid; gap: 7px; }
.suggestion-columns button { display: flex; justify-content: space-between; gap: 10px; width: 100%; border: 0; border-radius: 10px; padding: 10px 12px; text-align: left; color: #4d6078; background: #f7f9fc; }
.suggestion-columns button:hover { background: #edf3ff; color: #2458bd; }
.recent-panel > div + div { display: grid; gap: 8px; }
.recent-panel #recentQuestions button { width: 100%; border: 1px solid var(--line); border-radius: 11px; background: #fafcfc; padding: 10px; text-align: left; }
.recent-panel #recentQuestions b { display: block; font-size: 12px; margin-bottom: 5px; }
.recent-panel #recentQuestions small { color: var(--muted); }
.chat-section { margin-top: 20px; background: white; border: 1px solid #dfe6ef; border-radius: 22px; padding: 20px; box-shadow: 0 12px 36px rgba(43,71,120,.08); }
.chat-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.chat-status span { color: #285bc8; font-weight: 800; }
.chat-status small { color: var(--muted); }
.chat-messages { max-height: 520px; min-height: 160px; overflow: auto; display: grid; gap: 12px; padding: 18px 4px; }
.assistant-message, .user-message { max-width: 86%; padding: 14px 16px; border-radius: 16px; line-height: 1.7; }
.assistant-message { justify-self: start; background:#fff; border:1px solid #e5ebf2; border-top-left-radius:5px; box-shadow:0 8px 24px rgba(39,60,91,.05); }
.user-message { justify-self: end; color: white; background: linear-gradient(135deg, #3c78ef, #275bd2); border-top-right-radius: 5px; }
.assistant-message > b { color:#27806d; font-size:12px; letter-spacing:.04em; }
.assistant-message p, .user-message p { margin: 5px 0 0; }
.answer-body { color:#243247; font-size:15px; line-height:1.82; }
.answer-body p { margin:10px 0 0; }
.answer-body h4 { margin:18px 0 5px; color:#17283e; font-size:16px; }
.answer-body ul,.answer-body ol { margin:8px 0 0; padding-left:24px; }
.answer-body li { margin:5px 0; }
.answer-body strong { color:#17283e; font-weight:700; }
.answer-citation { color:#16836d; font-size:.86em; font-weight:700; white-space:nowrap; }
.answer-sources { display:grid; gap:7px; margin-top:18px; padding:14px; border:1px solid #dfe9e6; border-radius:12px; background:#f7fbfa; }
.answer-sources > b { font-size: 12px; color: var(--green-dark); }
.answer-sources a { display:grid; grid-template-columns:1fr auto; align-items:center; gap:12px; padding:8px 9px; border-radius:9px; color:inherit; text-decoration:none; }
.answer-sources a:hover { background:#eaf6f2; }
.answer-sources span { font-family:"Noto Serif SC","Songti SC",SimSun,serif; font-size:12px; line-height:1.55; color:#51697a; }
.answer-sources span strong { display:block; color:#385467; font-weight:600; }
.answer-sources small { display: block; color: #8a97a6; margin-left: 18px; }
.answer-sources i { color:#20836e; font-size:11px; font-style:normal; white-space:nowrap; }
.answer-web-sources { border-color:#dbe7f7; background:#f7faff; }
.answer-web-sources > b,.answer-web-sources i { color:#356fb5; }
.answer-web-sources a:hover { background:#edf4fd; }
.web-search-status { display:flex; align-items:center; gap:7px; margin-top:14px; padding:9px 11px; border-radius:9px; color:#6c7890; background:#f3f5f8; font-size:11px; }
.web-search-status.success { color:#276e60; background:#edf8f5; }
.web-search-status span { font-size:15px; }
.answer-loading { display:flex; align-items:center; gap:13px; min-width:320px; color:#526279; }
.answer-loading-spinner { width:22px; height:22px; flex:none; border:3px solid #dce9f7; border-top-color:#3976e7; border-radius:50%; animation:qa-answer-spin .8s linear infinite; }
.answer-loading div { display:grid; gap:3px; }
.answer-loading b { color:#304660; font-size:13px; }
.answer-loading small { color:#8a98aa; font-size:11px; }
.answer-loading i { display:flex; gap:4px; margin-top:3px; }
.answer-loading em { width:5px; height:5px; border-radius:50%; background:#5790ef; animation:qa-answer-dot 1.1s ease-in-out infinite; }
.answer-loading em:nth-child(2) { animation-delay:.16s; }
.answer-loading em:nth-child(3) { animation-delay:.32s; }
@keyframes qa-answer-spin { to { transform:rotate(360deg); } }
@keyframes qa-answer-dot { 0%,70%,100% { opacity:.28; transform:translateY(0); } 35% { opacity:1; transform:translateY(-3px); } }
.typing span { animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.chat-composer { display: grid; grid-template-columns: 1fr 48px; gap: 10px; padding: 8px; border: 1px solid #dce4ee; border-radius: 16px; box-shadow: 0 6px 18px rgba(41,74,120,.07); }
.chat-composer textarea { border: 0; outline: 0; resize: none; padding: 10px 12px; line-height: 1.5; }
.chat-composer button { width: 46px; height: 46px; border: 0; border-radius: 50%; color: white; background: linear-gradient(135deg, #6091fb, #2c64e8); font-size: 20px; }
.assistant-disclaimer { margin: 10px 0 0; text-align: center; color: #8996a5; font-size: 11px; }

/* AI and product admin */
.ai-config-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; width: 100%; }
.config-status { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 14px; background: #f7fafb; margin-bottom: 16px; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: #d0d5dd; }
.status-dot.connected { background: #12b76a; box-shadow: 0 0 0 5px #ecfdf3; }
.product-doc-list { display: grid; gap: 10px; }
.product-doc-item { border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.product-doc-item header { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.product-doc-item p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

/* Assistant landing and subpages */
.document-entry { display: grid; grid-template-columns: 110px 1fr auto; gap: 22px; align-items: center; margin-top: 20px; padding: 24px 28px; border: 1px solid #dce7fb; border-radius: 22px; background: linear-gradient(135deg,#f6f9ff,#eef4ff); box-shadow: 0 8px 24px rgba(47,91,180,.07); }
.document-entry:hover { border-color: #8eb1f6; transform: translateY(-2px); }
.document-art { position: relative; width: 82px; height: 96px; display: grid; place-items: center; border-radius: 12px 12px 18px 18px; color: #4e78d6; background: linear-gradient(145deg,#fff,#dfe9ff); box-shadow: 0 12px 22px rgba(55,101,197,.15); font-weight: 850; }
.document-art span { position: absolute; right: -16px; bottom: -10px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: white; background: #477cee; }
.document-entry > div:nth-child(2) > span { color: #3970db; font-size: 11px; font-weight: 850; letter-spacing: .1em; }
.document-entry h2 { margin: 6px 0; color: #234a9a; }
.document-entry p { margin: 0; color: var(--muted); }
.document-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; max-width: 330px; }
.document-actions span { padding: 8px 10px; border-radius: 10px; color: #4167ad; background: white; font-size: 12px; }
.document-actions b { width: 100%; margin-top: 8px; text-align: right; color: #2e63cf; }
.landing-questions, .landing-recent { margin-top: 20px; }
.landing-recent #recentQuestions { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.landing-recent #recentQuestions a { display: block; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fafcfc; }
.landing-recent #recentQuestions b, .landing-recent #recentQuestions small { display: block; }
.landing-recent #recentQuestions small { color: var(--muted); margin-top: 5px; }
.suggestion-columns a { display: flex; justify-content: space-between; gap: 10px; width: 100%; border-radius: 10px; padding: 10px 12px; color: #4d6078; background: #f7f9fc; }
.suggestion-columns a:hover { background: #edf3ff; color: #2458bd; }

.qa-workspace-page { min-height: 100vh; background: #f4f7fb; }
.qa-workspace { max-width: 1220px; height: calc(100vh - 100px); min-height: 650px; display: grid; grid-template-columns: 310px 1fr; gap: 18px; margin: 18px auto; padding: 0 20px; }
.qa-settings, .qa-chat { background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 8px 26px rgba(40,65,105,.06); }
.qa-settings { padding: 20px; overflow: auto; }
.qa-settings-head { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.qa-settings-head b, .qa-settings-head small { display: block; }
.qa-settings-head small { color: var(--muted); margin-top: 3px; }
.choice-stack { display: grid; gap: 8px; margin-bottom: 20px; }
.choice-stack label input { display: none; }
.choice-stack label span { display: block; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fafcfc; }
.choice-stack label input:checked + span { border-color: #7fa5f3; background: #f0f5ff; box-shadow: 0 0 0 3px rgba(65,112,218,.07); }
.choice-stack label b, .choice-stack label small { display: block; }
.choice-stack label small { color: var(--muted); margin-top: 3px; line-height: 1.45; }
.choice-stack label small.configured { color: #13815f; }
.knowledge-summary { padding: 14px; border-radius: 14px; background: #f3f7fd; margin-bottom: 18px; }
.knowledge-summary p { color: #405a83; line-height: 1.6; margin: 7px 0; }
.knowledge-summary small { color: var(--muted); }
.qa-settings > .button { display: block; text-align: center; }
.qa-chat { min-width: 0; display: grid; grid-template-rows: auto 1fr auto auto auto; padding: 18px; }
.qa-chat-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.qa-chat-top > div { display: flex; align-items: center; gap: 10px; }
.qa-chat-top button { border: 0; background: #f2f5f8; border-radius: 10px; padding: 8px 11px; color: #5b6b7d; }
.qa-messages { max-height: none; min-height: 0; }
.quick-prompts { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.quick-prompts button { border: 1px solid #dfe7f1; border-radius: 999px; background: #f8fafc; color: #5b6c83; padding: 7px 10px; font-size: 12px; }

.document-ai-page { min-height: 100vh; background: #f4f7fb; }
.document-workspace { max-width: 1180px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 20px; margin: 22px auto; padding: 0 20px 50px; }
.upload-workbench, .process-workbench { background: white; border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: 0 8px 26px rgba(40,65,105,.06); }
.workbench-title { display: flex; gap: 12px; margin-bottom: 18px; }
.workbench-title > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: white; background: #3972e4; font-weight: 850; }
.workbench-title h2, .workbench-title p { margin: 0; }
.workbench-title p { color: var(--muted); margin-top: 4px; }
.document-drop { min-height: 205px; display: flex; flex-direction: column; align-items: center; justify-content: center; margin-bottom: 18px; border: 1px dashed #9eb7e7; border-radius: 18px; background: #f7faff; text-align: center; }
.document-drop input { display: none; }
.document-drop p { color: var(--muted); font-size: 12px; }
.document-file-icon { position: relative; width: 68px; height: 78px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 10px; color: #4c75cf; background: white; box-shadow: 0 8px 20px rgba(55,93,168,.14); font-weight: 850; }
.document-file-icon small { position: absolute; right: -11px; bottom: -8px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: white; background: #4779e7; }
.document-content { min-height: 250px !important; }
.process-settings { display: grid; grid-template-columns: 180px 1fr; gap: 16px; }
.task-buttons { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.task-buttons button { border: 1px solid var(--line); border-radius: 11px; background: #fafcfc; color: #627083; padding: 11px 8px; }
.task-buttons button.active { color: #285fc8; border-color: #82a7ef; background: #eff5ff; }
.process-button { width: 100%; margin: 18px 0; }
.processing-result { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.processing-result .suggestion-header { padding: 14px 16px; margin: 0; border-bottom: 1px solid var(--line); }
.result-paper { min-height: 360px; padding: 20px; color: #4b5d72; line-height: 1.85; background: #fcfdfd; overflow: auto; }

/* Refined academic Q&A */
.qa-refined-page { min-height: 100vh; padding-bottom: 112px; background: linear-gradient(180deg,#fbfdff 0,#fff 36%); }
.qa-refined-header { background: rgba(255,255,255,.96); }
.qa-refined-shell { max-width: 900px; margin: 0 auto; padding: 0 28px 50px; }
.qa-control-bar { min-height: 78px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #edf1f6; }
.qa-control-bar select { max-width: 230px; height: 42px; padding: 0 38px 0 14px; border: 1px solid #dce5f2; border-radius: 12px; background: #fff; color: #243653; outline: none; }
.qa-library-multiselect { position:relative; width:260px; }
.qa-library-multiselect > button { width:100%; height:42px; padding:0 38px 0 14px; border:1px solid #dce5f2; border-radius:12px; background:#fff; color:#243653; text-align:left; cursor:pointer; }
.qa-library-multiselect > button::after { content:'⌄'; position:absolute; right:14px; top:8px; font-size:18px; }
.qa-library-panel { position:absolute; z-index:40; top:49px; left:0; width:320px; max-height:430px; overflow:auto; padding:12px; border:1px solid #dce5f2; border-radius:14px; background:#fff; box-shadow:0 16px 42px rgba(31,51,82,.16); }
.qa-library-panel-head { display:flex; justify-content:space-between; align-items:center; padding:2px 4px 10px; }
.qa-library-panel-head button { border:0; background:transparent; color:var(--green); cursor:pointer; }
.qa-library-panel fieldset { margin:0 0 10px; padding:8px; border:1px solid #edf1f6; border-radius:10px; }
.qa-library-panel legend { padding:0 5px; color:#6c7c91; font-size:12px; }
.qa-library-panel label { display:grid; grid-template-columns:20px 1fr auto; align-items:center; gap:8px; min-height:34px; padding:4px 6px; border-radius:8px; cursor:pointer; }
.qa-library-panel label:hover { background:#f5faf8; }
.qa-library-panel input { width:16px; height:16px; margin:0; accent-color:var(--green); }
.qa-library-panel small { color:#8794a6; }
.qa-library-category { margin:5px 0; border:1px solid #e8eef2; border-radius:9px; background:#fbfdfd; }
.qa-library-category > summary { display:flex; align-items:center; justify-content:space-between; padding:9px 10px; color:#354b5c; font-weight:650; cursor:pointer; list-style:none; }
.qa-library-category > summary::-webkit-details-marker { display:none; }
.qa-library-category > summary::before { content:'›'; margin-right:7px; color:var(--green); }
.qa-library-category[open] > summary::before { transform:rotate(90deg); }
.qa-library-category > summary span { flex:1; }
.qa-library-category > summary > button { margin-right:10px; border:0; color:var(--green-dark); background:transparent; font-size:12px; cursor:pointer; }
.qa-library-category > div { padding:0 4px 5px; }
.qa-library-subgroup > header { display:flex; align-items:center; justify-content:space-between; padding:7px 6px 3px; }
.qa-library-subgroup > header b { color:#667b86; font-size:12px; }
.qa-library-subgroup > header button { border:0; color:var(--green-dark); background:transparent; font-size:12px; cursor:pointer; }
.qa-web-search-toggle { display:inline-flex; align-items:center; gap:7px; min-width:max-content; height:42px; padding:0 11px; border:1px solid #dce5f2; border-radius:12px; background:#fff; color:#526279; font-size:12px; cursor:pointer; }
.qa-web-search-toggle input { width:16px; height:16px; margin:0; accent-color:var(--green); }
.qa-web-search-toggle:has(input:checked) { border-color:#8fd7c5; background:#f0faf7; color:#16715e; }
.qa-connection { margin-left: auto; display: inline-flex; align-items: center; gap: 9px; color: #526279; font-size: 13px; }
.qa-connection i { width: 9px; height: 9px; border-radius: 50%; background: #12be72; box-shadow: 0 0 0 4px #eafbf3; }
.inline-document-flow { padding: 26px 0 20px; border-bottom: 1px solid #e9eef5; }
.document-flow-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.document-flow-title > div { display: flex; align-items: center; gap: 10px; color: #243653; }
.upload-line-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #315fa8; border: 1px solid #cbd8e9; font-size: 18px; }
.primary-upload-button { display: inline-flex; align-items: center; justify-content: center; min-width: 136px; height: 44px; border-radius: 12px; color: white; background: #1769ee; box-shadow: 0 8px 18px rgba(23,105,238,.2); font-weight: 750; }
.primary-upload-button input, .replace-document input { display: none; }
.selected-document { display: grid; grid-template-columns: 46px 1fr auto auto; align-items: center; gap: 14px; margin-top: 14px; padding: 15px 0; border-top: 1px solid #edf1f6; }
.mini-pdf-icon { width: 42px; height: 52px; display: grid; place-items: end center; padding-bottom: 6px; border-radius: 6px; color: white; background: linear-gradient(145deg,#4385fa,#1259da); font-size: 11px; font-weight: 850; }
.selected-document > div b, .selected-document > div small { display: block; }
.selected-document > div small { color: #7d899a; margin-top: 4px; }
.library-success { color: #10a963; font-size: 13px; white-space: nowrap; }
.replace-document { color: #1266df; font-size: 13px; white-space: nowrap; }
.document-inline-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.document-inline-actions button { height: 44px; border: 1px solid #abc2ed; border-radius: 11px; color: #1764dd; background: white; font-weight: 750; }
.document-inline-actions button:first-child { color: white; border-color: #1769ee; background: #1769ee; }
.section-translation-actions { grid-template-columns: minmax(0,1.65fr) minmax(190px,.75fr); align-items: stretch; }
.translation-choice-group { padding: 12px; border: 1px solid #d7e3f5; border-radius: 14px; background: #f8faff; }
.translation-choice-group > span { display: block; margin: 0 0 9px 2px; color: #5a6f8e; font-size: 12px; font-weight: 750; }
.translation-choice-group > div { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.document-inline-actions .translation-section-button { height: 38px; padding: 0 8px; color: #1764dd; border-color: #d3e1f7; background: white; font-size: 13px; }
.document-inline-actions .translation-section-button:first-child { color: #1764dd; border-color: #d3e1f7; background: white; }
.document-inline-actions .quick-read-action { height: auto; min-height: 64px; color: white; border-color: #1769ee; background: #1769ee; }
.document-inline-actions button:disabled { cursor: not-allowed; color: #8798b2; border-color: #dce5f2; background: #eef2f7; box-shadow: none; }
.document-inline-actions button:first-child:disabled { color: #fff; border-color: #92b5ec; background: #92b5ec; }
.primary-upload-button.is-disabled, .replace-document.is-disabled { pointer-events: none; opacity: .48; }
.document-processing-status { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px 16px; border: 1px solid #cfe0ff; border-radius: 13px; color: #28558f; background: linear-gradient(135deg,#f4f8ff,#eef6ff); }
.document-processing-status b, .document-processing-status small { display: block; }
.document-processing-status small { margin-top: 3px; color: #75869e; }
.processing-spinner { width: 22px; height: 22px; flex: 0 0 auto; border: 3px solid #c7dcff; border-top-color: #1769ee; border-radius: 50%; animation: processing-spin .8s linear infinite; }
@keyframes processing-spin { to { transform: rotate(360deg); } }
.upload-progress { margin-top: 12px; color: #55708d; font-size: 13px; }
@media (max-width:680px) {
  .section-translation-actions { grid-template-columns: 1fr; }
  .translation-choice-group > div { grid-template-columns: repeat(2,1fr); }
  .document-inline-actions .quick-read-action { min-height: 48px; }
}
@media (max-width:760px) {
  .me-shell { padding: 28px 16px 48px; }
  .profile-hero { grid-template-columns: 1fr auto; min-height: 132px; padding: 22px; }
  .me-stat-grid { grid-template-columns: repeat(2,1fr); }
  .me-stat-card { min-height: 158px; padding: 18px; }
  .me-stat-card > span { width: 46px; height: 46px; margin-bottom: 14px; }
  .me-menu-card small { font-size: 12px; }
  .product-center-shell { padding:26px 16px 55px; }
  .product-center-header { align-items:flex-start; }.product-center-header h1 { font-size:29px; }.product-center-header p { font-size:12px; }.product-center-header label { width:46px; height:46px; padding:10px; }.product-center-header label input { display:none; }
  .health-manager-hero { min-height:330px; grid-template-columns:1fr; padding:28px 24px; }.health-manager-hero h2 { font-size:39px; }.health-manager-hero p { max-width:62%; font-size:14px; }.health-manager-hero > div:first-child > div { flex-direction:column; align-items:flex-start; }.health-manager-hero a { padding:11px 16px; }.health-bot { position:absolute; right:-18px; bottom:9px; transform:scale(.7); transform-origin:bottom right; }
  .product-family-grid { gap:9px; }.family-card { min-height:260px; }.family-card header { display:block; padding:14px 12px 0; }.family-card header span { width:38px; height:38px; margin-bottom:7px; }.family-card h2 { font-size:17px; }.family-card p { min-height:38px; margin:7px 12px 0; font-size:11px; }.family-visual { min-height:115px; }.family-card strong { padding:11px 5px; font-size:12px; }.family-visual.lab b { width:55px; right:8px; }.family-visual.lab i:nth-child(1){left:10px}.family-visual.lab i:nth-child(2){left:33px}.family-visual.lab i:nth-child(3){left:56px}.family-visual.gut span{font-size:92px}
  .materials-entry { grid-template-columns:auto 1fr; gap:13px; padding:20px 17px; }.materials-icon { width:52px; height:62px; }.materials-entry h2 { font-size:24px; }.materials-entry p { font-size:12px; }.materials-entry strong { grid-column:2; }.materials-entry div div span { font-size:10px; padding:5px 7px; }
  .solution-card { flex-basis:175px; }.solution-card > div { height:105px; }
  .product-detail-shell,.materials-shell,.health-manager-shell { padding:22px 16px 60px; }.subpage-header { padding:11px 16px; }.detail-product-hero { min-height:260px; grid-template-columns:1fr; padding:28px 24px; }.detail-symbol { display:none; }.detail-content-grid,.materials-grid { grid-template-columns:1fr; }.manager-form-grid { grid-template-columns:1fr; }.manager-form label.full { grid-column:auto; }
}
.qa-greeting { padding: 56px 10px; text-align: center; }

.manager-consent { display:flex!important; align-items:flex-start; gap:9px; margin-top:16px; padding:12px 14px; border-radius:11px; color:#647588!important; background:#f5f8fa; font-size:12px!important; font-weight:600!important; line-height:1.55; }
.manager-consent input { width:16px; height:16px; margin:2px 0 0; flex:none; accent-color:var(--green); }

.manager-form label em { margin-left:6px; color:#94a2af; font-size:11px; font-style:normal; font-weight:600; }
.fga-plan-upload { grid-column:1/-1; margin-top:20px; padding:18px; border:1px solid #d9e9e5; border-radius:16px; background:linear-gradient(135deg,#f5fbf9,#f5f9ff); }
.fga-upload-heading { display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:12px; }
.fga-upload-icon { width:44px; height:44px; display:grid; place-items:center; border-radius:13px; color:white; background:linear-gradient(145deg,#20ae8c,#3187db); font-size:12px; font-weight:900; box-shadow:0 8px 18px rgba(36,137,148,.2); }
.fga-upload-heading b,.fga-upload-heading small { display:block; }
.fga-upload-heading b { color:#203b54; font-size:15px; }
.fga-upload-heading small { margin-top:4px; color:#80909f; font-size:12px; }
.fga-detect-now { padding:9px 13px; border:1px solid #57af9d; border-radius:10px; color:#16876f; background:white; font-size:12px; font-weight:850; white-space:nowrap; }
.fga-upload-control { display:flex!important; align-items:center; justify-content:space-between; gap:12px; margin-top:15px; padding:12px 14px; border:1px dashed #9bc9bf; border-radius:12px; background:rgba(255,255,255,.82); cursor:pointer; }
.fga-upload-control input { display:none; }
.fga-upload-control span { color:#17896f; font-weight:800; }
.fga-upload-control small { color:#8695a4; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fga-upload-control.uploaded { border-style:solid; border-color:#63b9a5; background:#effaf6; }
.voice-field-heading { display:flex; align-items:center; justify-content:space-between; gap:14px; }
.voice-field-heading b { color:#56697e; font-size:13px; }
.voice-input-tip { display:block; margin-top:5px; color:#8c9bab; font-size:11px; font-weight:600; }
.voice-input-button { display:inline-flex; align-items:center; gap:5px; flex:none; padding:7px 11px; border:1px solid #93c8bb; border-radius:999px; color:#168a70; background:#f1faf7; font-size:11px; font-weight:850; cursor:pointer; }
.voice-input-button span { font-size:10px; }
.voice-input-button.listening { color:white; border-color:#ef7878; background:#ef7878; box-shadow:0 0 0 5px rgba(239,120,120,.12); }
.voice-field textarea { margin-top:9px; }
.voice-textarea-wrap { position:relative; display:block; }
.voice-textarea-wrap textarea { min-height:132px; padding-bottom:52px; }
.voice-box-tools { position:absolute; right:10px; bottom:10px; left:12px; display:flex; align-items:center; justify-content:flex-end; gap:10px; pointer-events:none; }
.voice-box-tools small { color:#93a0ad; font-size:11px; font-weight:600; }
.voice-box-tools .voice-input-button { pointer-events:auto; }

.health-plan-stats { margin-bottom:20px; }
.health-plan-table td { vertical-align:middle; }
.health-plan-modal { width:min(920px,calc(100vw - 32px)); }
.health-plan-detail { display:grid; gap:16px; max-height:75vh; overflow:auto; }
.health-plan-patient-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.health-plan-patient-grid > div { padding:14px; border-radius:12px; background:#f3f8f7; }
.health-plan-patient-grid small,.health-plan-patient-grid b { display:block; }
.health-plan-patient-grid small { margin-bottom:5px; color:#81909f; }
.health-plan-detail section { padding:16px 18px; border:1px solid var(--line); border-radius:13px; }
.health-plan-detail h4 { margin:0 0 8px; color:#24465b; }
.health-plan-detail p { margin:0; color:#52677a; line-height:1.75; }
.health-plan-detail .generated-plan-copy { border-color:#bfe1d8; background:#f5fbf9; }
.health-plan-meta { color:#8b99a6; font-size:12px; text-align:right; }

.admin-tag-filter-row { display:flex; flex-wrap:wrap; gap:10px; margin:-8px 0 16px; padding:14px; border:1px solid #e3ecee; border-radius:14px; background:#f8fbfb; }
.admin-tag-filter-row:empty { display:none; }
.admin-tag-multiselect { position:relative; width:240px; color:#718293; font-size:11px; font-weight:750; }
.admin-tag-multiselect > span { display:block; margin:0 0 5px 3px; }
.admin-tag-multiselect > button { position:relative; width:100%; padding:10px 34px 10px 11px; border:1px solid #dce6e8; border-radius:9px; color:#40586d; background:white; text-align:left; cursor:pointer; }
.admin-tag-multiselect > button::after { content:'⌄'; position:absolute; right:12px; top:7px; font-size:16px; }
.admin-tag-options { position:absolute; z-index:45; top:59px; left:0; width:290px; max-height:360px; overflow:auto; padding:10px; border:1px solid #dce6e8; border-radius:12px; background:white; box-shadow:0 15px 36px rgba(27,51,68,.16); }
.admin-tag-options header { display:flex; justify-content:space-between; align-items:center; padding:2px 5px 8px; }
.admin-tag-options header b { color:#506477; }
.admin-tag-options header button { border:0; color:var(--green); background:transparent; cursor:pointer; }
.admin-tag-options label { display:flex; align-items:center; gap:8px; min-width:0; padding:7px 6px; border-radius:7px; color:#506477; cursor:pointer; }
.admin-tag-options label:hover { background:#f1f8f6; }
.admin-tag-options input { width:16px; height:16px; margin:0; accent-color:var(--green); }
.admin-tag-options i { font-style:normal; font-weight:650; }
.tag-field-card footer { display:flex; justify-content:flex-end; gap:8px; margin-top:16px; padding-top:15px; border-top:1px solid var(--line); }
.tag-field-description { margin:10px 0 16px; padding:10px 12px; border-radius:10px; color:#667b8e; background:#f6f9fa; font-size:12px; line-height:1.6; }
.tag-field-options { overflow:visible; }
.button.danger-text { border:1px solid #f1caca; color:#bd5252; background:#fff8f8; }
.tag-field-modal { width:min(900px,calc(100vw - 32px)); }
.scope-checks { display:flex; flex-wrap:wrap; gap:8px 16px; min-height:42px; align-items:center; }
.scope-checks label { display:flex; align-items:center; gap:6px; }
.shared-scope-hint { flex-basis:100%; color:var(--green); font-weight:700; }
.tag-option-editor-head { display:flex; align-items:center; justify-content:space-between; margin:22px 0 10px; }
.tag-option-editor-head small { display:block; margin-top:4px; color:#8795a2; }
.tag-option-editor { display:grid; gap:8px; }
.tag-option-edit-row { display:grid; grid-template-columns:.7fr .8fr 1fr 1.2fr 1.2fr auto auto; gap:8px; align-items:center; padding:10px; border:1px solid #e2e9eb; border-radius:11px; background:#f9fbfb; }
.tag-option-edit-row input { width:100%; padding:10px; border:1px solid #dbe5e7; border-radius:8px; }
.ai-fill-tag-option { min-width:86px; color:var(--green-dark); }
.ai-fill-tag-option:disabled { cursor:wait; opacity:.65; }
.structured-tag-editor { display:grid; gap:12px; }
.structured-tag-editor > section { padding:13px 14px; border:1px solid #e0e9eb; border-radius:12px; background:#fafcfc; }
.structured-tag-editor > section > header { display:flex; align-items:center; justify-content:space-between; margin-bottom:9px; }
.structured-tag-editor > section > header small { color:#8b99a6; font-size:11px; }
.tag-option-group { width:100%; border:1px solid #e4ecee; border-radius:10px; background:#fff; }
.tag-option-group + .tag-option-group { margin-top:7px; }
.tag-option-group > summary { display:flex; justify-content:space-between; align-items:center; padding:10px 12px; color:#263d4a; font-weight:700; cursor:pointer; list-style:none; }
.tag-option-group > summary::-webkit-details-marker { display:none; }
.tag-option-group > summary::before { content:'›'; margin-right:8px; color:var(--green); transition:transform .15s ease; }
.tag-option-group[open] > summary::before { transform:rotate(90deg); }
.tag-option-group > summary .tag-group-name { flex:1; }
.tag-option-group.has-ai-selection { border-color:#8fdcc5; background:#fbfffd; }
.tag-option-group.has-ai-selection > summary { background:#effaf6; }
.tag-group-ai-selection { display:flex; align-items:center; justify-content:flex-end; gap:6px; min-width:0; margin:0 9px; }
.tag-group-ai-selection b { flex:none; padding:2px 6px; border-radius:999px; color:#08785c; background:#dff6ee; font-size:10px; }
.tag-group-ai-selection i { max-width:180px; overflow:hidden; color:#08785c; font-size:11px; font-style:normal; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.admin-tag-options .tag-option-group > summary > button { margin-right:9px; border:0; color:var(--green-dark); background:transparent; font-size:11px; cursor:pointer; }
.tag-option-group > summary small { color:#8795a2; font-weight:500; }
.tag-option-group-body { display:flex; flex-wrap:wrap; gap:7px; padding:2px 9px 10px; }
.admin-tag-options .tag-option-group-body { display:block; }
.admin-tag-options .tag-option-group > summary { padding:8px; }
.grouped-check-list { display:block; }
.tag-option-subgroup { width:100%; padding:5px 0 8px; }
.tag-option-subgroup > header { display:flex; align-items:center; justify-content:space-between; margin:0 4px 7px; }
.tag-option-subgroup > header b { color:#667b86; font-size:12px; }
.tag-option-subgroup > header button { border:0; color:var(--green-dark); background:transparent; font-size:12px; cursor:pointer; }
.tag-option-subgroup > div { display:flex; flex-wrap:wrap; gap:7px; }
.admin-tag-options .tag-option-subgroup > div { display:block; }
.tag-field-card .tag-option-group-body { display:block; padding:4px 14px 14px; }
.tag-field-card .tag-option-subgroup { padding:8px 0 12px; }
.tag-field-card .tag-option-subgroup + .tag-option-subgroup { border-top:1px solid #e8eef0; }
.tag-field-card .tag-option-subgroup > header { margin:0 0 4px; padding-top:2px; }
.tag-field-card .tag-option-subgroup > div { display:block; width:100%; }
.tag-field-card .tag-option-subgroup .option-row:first-child { border-top-color:#e8eef0; }
.product-library-toolbar { margin-bottom:18px; }
.product-doc-item .row-actions { margin-top:12px; }
.analytics-trend { margin:20px 0; }
.analytics-bars { height:230px; display:flex; align-items:flex-end; gap:6px; overflow-x:auto; padding:15px 4px 0; }
.analytics-day { min-width:30px; height:100%; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; gap:7px; }
.analytics-day .bar-stack { width:20px; height:185px; display:flex; align-items:flex-end; gap:3px; }
.analytics-day i { width:8px; min-height:2px; border-radius:5px 5px 2px 2px; background:#3b8bea; }
.analytics-day i.visitors { background:#2fb69a; }
.analytics-day small { color:#8997a5; font-size:9px; transform:rotate(-45deg); transform-origin:center; white-space:nowrap; }
.analytics-ranking-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; }
.ranking-list > div { display:grid; grid-template-columns:25px 1fr auto; gap:9px; align-items:center; padding:11px 0; border-bottom:1px solid var(--line); }
.ranking-list > div:last-child { border:0; }.ranking-list span { width:23px; height:23px; display:grid; place-items:center; border-radius:7px; color:#277c6c; background:#eaf7f3; font-size:11px; }.ranking-list b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:#43596d; }.ranking-list em { color:#278c79; font-style:normal; font-weight:850; }
.skill-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:16px; }
.skill-card { padding:20px; border:1px solid var(--line); border-radius:16px; background:white; box-shadow:var(--shadow); }
.skill-card header { display:flex; justify-content:space-between; gap:14px; }.skill-card header span { color:#248b77; font-size:11px; font-weight:850; text-transform:uppercase; }.skill-card h3 { margin:5px 0 0; }.skill-card header i { height:max-content; padding:6px 9px; border-radius:8px; color:#9b6c6c; background:#fff0f0; font-size:11px; font-style:normal; }.skill-card header i.active { color:#197962; background:#eaf8f4; }.skill-card p { min-height:64px; color:#687b8d; font-size:13px; line-height:1.65; }.skill-meta { display:flex; flex-wrap:wrap; gap:7px; }.skill-meta span { padding:5px 8px; border-radius:7px; color:#657789; background:#f2f6f7; font-size:10px; }.skill-card footer { display:flex; justify-content:flex-end; gap:8px; margin-top:15px; padding-top:13px; border-top:1px solid var(--line); }.ai-skill-modal { width:min(900px,calc(100vw - 32px)); }

@media (max-width:560px) {
  .section-head-actions { justify-content:flex-start; }
  .preview-pane-full iframe { height:68vh; min-height:480px; }
  .pdf-page-scroller { height:68vh; min-height:480px; padding:10px; }
  .pdf-rendered-page { min-height:720px; margin-bottom:12px; }
  .page-translation-body { padding:12px; }
  .translation-compare-layout.split { grid-template-columns:1fr; height:auto; max-height:82vh; overflow:auto; }
  .translation-splitter { display:none; }
  .translation-original-pane { min-height:55vh; }
  .translation-result-pane { overflow:visible; }
  .translation-reading-head { align-items:flex-start; }
  .translation-reading-paper { padding:28px 20px 38px; }
  .translation-source-inspector { width:100%; max-height:150px; margin:0 auto 10px; }
  .materials-tag-filters { grid-template-columns:1fr; }
  .materials-filter-group { grid-template-columns:82px minmax(0,1fr); gap:8px; }
  .materials-filter-group > b { padding-bottom:2px; }
  .solution-html-frame { min-height:560px; height:calc(100vh - 130px); border-radius:14px; }
  .pdf-preview-actions { justify-content:flex-start; }
  .fga-upload-heading { grid-template-columns:auto 1fr; }
  .fga-detect-now { grid-column:1/-1; text-align:center; }
  .fga-upload-control { align-items:flex-start; flex-direction:column; }
  .fga-upload-control small { max-width:100%; white-space:normal; }
  .voice-field-heading { align-items:flex-start; }
  .voice-box-tools { justify-content:space-between; }
  .health-plan-patient-grid { grid-template-columns:1fr 1fr; }
  .tag-option-edit-row { grid-template-columns:1fr; }
  .tag-option-edit-row .icon-button { justify-self:end; }
  .analytics-ranking-grid,.skill-grid { grid-template-columns:1fr; }
}
.qa-greeting .mode-icon { margin: auto; }
.qa-greeting h1 { margin: 16px 0 8px; color: #1d3151; font-size: 23px; }
.qa-greeting p { margin: 0; color: #728096; }
.qa-greeting .quick-prompts { justify-content: center; margin-top: 18px; }
.html-reading-result { padding: 34px 14px 10px; }
.html-result-label { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; color: #52627a; }
.html-result-label span { width: 4px; height: 22px; border-radius: 4px; background: #1769ee; }
.html-result-label small { margin-left: auto; color: #9aa5b4; }
.rendered-document-html { color: #263b59; }
.rendered-document-html article > header { margin-bottom: 24px; }
.rendered-document-html article > header > span { color: #1769ee; font-size: 13px; }
.rendered-document-html h1 { margin: 8px 0; color: #122a50; font-size: clamp(25px,4vw,34px); line-height: 1.35; }
.rendered-document-html h2 { margin: 0 0 8px; color: #1762d0; font-size: 17px; }
.rendered-document-html p, .rendered-document-html li { color: #415572; line-height: 1.85; }
.rendered-document-html section { padding: 20px 0; border-top: 1px solid #e6edf6; }
.rendered-document-html ul { margin: 0; padding-left: 22px; }
.refined-chat-messages { min-height: 0; max-height: none; padding: 16px 4px; }
.refined-system-message { margin-top: 10px; }
.qa-bottom-dock { position: fixed; left: 50%; bottom: 0; z-index: 25; transform: translateX(-50%); width: min(900px,100%); padding: 10px 28px 12px; background: linear-gradient(180deg,rgba(255,255,255,0),#fff 22%); }
.qa-refined-composer { grid-template-columns: 1fr 32px 46px; background: white; box-shadow: 0 12px 36px rgba(28,62,108,.14); }
.qa-refined-composer > span { display: grid; place-items: center; color: #60718b; font-size: 22px; }
.qa-bottom-dock > p { margin: 8px 0 0; text-align: center; color: #98a3b2; font-size: 11px; }

.quick-read-html header p { color: #8995a6; }
.quick-read-html header::after { content: '个人文献库'; display: inline-flex; margin-top: 8px; padding: 5px 9px; border-radius: 999px; color: #1764d6; background: #eef4ff; font-size: 12px; }

@media (max-width: 980px) {
  .assistant-grid, .ai-config-grid { grid-template-columns: 1fr; }
  .qa-workspace, .document-workspace { grid-template-columns: 1fr; height: auto; }
  .qa-settings { overflow: visible; }
  .qa-chat { min-height: 650px; }
}

@media (max-width: 980px) {
  .admin-shell { grid-template-columns: 82px 1fr; }
  .sidebar { padding: 24px 12px; }
  .brand > div:last-child, .nav button span, .sidebar-footer { display: none; }
  .brand { justify-content: center; }
  .nav button { text-align: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid, .review-layout { grid-template-columns: 1fr; }
  .filters { grid-template-columns: repeat(2, 1fr); }
  .report-stack, .report-admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .admin-shell { display: block; }
  .sidebar { position: fixed; top: auto; bottom: 0; z-index: 40; width: 100%; height: 70px; padding: 8px; }
  .brand, .sidebar-footer { display: none; }
  .nav { grid-template-columns: repeat(6, 1fr); }
  .nav button { padding: 10px 4px; font-size: 11px; text-align: center; }
  .nav button span { display: block; }
  .admin-topbar { padding: 0 18px; }
  .admin-content { padding: 22px 16px 100px; }
  .stats-grid, .tag-field-grid, .form-grid, .workflow { grid-template-columns: 1fr; }
  .literature-table th:nth-child(2), .literature-table td:nth-child(2), .literature-table th:nth-child(3), .literature-table td:nth-child(3) { display: none; }
  .literature-table .title-cell { min-width: 230px; }
  .tag-field-card { padding:17px; }
  .tag-field-card header { align-items:flex-start; flex-direction:column; gap:10px; }
  .tag-card-badges { justify-content:flex-start; }
  .option-row { grid-template-columns:minmax(0,1fr) auto; gap:5px 10px; padding:12px 0; }
  .option-row small { grid-column:1 / -1; }
  .option-row .badge { grid-column:2; grid-row:1; }
  .hero { display: block; }
  .result-counter { margin-top: 20px; display: inline-block; }
  .filters { grid-template-columns: 1fr 1fr; }
  .app-main { padding: 28px 16px 50px; }
  .app-header-inner { padding: 14px 16px; }
  .app-brand small { display: none; }
  .public-search { display: grid; }
  .lit-card { padding: 18px; gap: 8px; }
  .lit-card h3 { font-size: 17px; }
  .bottom-nav { width: 100%; left: 0; bottom: 0; transform: none; border-radius: 20px 20px 0 0; border-left: 0; border-right: 0; border-bottom: 0; }
  .home-main { padding: 28px 16px 60px; }
  .home-report { min-height: 360px; padding: 28px 24px; }
  .report-content { width: 82%; }
  .report-orb { width: 225px; height: 225px; right: -86px; }
  .archive-section { margin-top:20px; padding:22px 18px; border-radius:22px; }
  .archive-heading { align-items:center; margin-bottom:16px; }
  .archive-heading p { font-size:12px; }
  .archive-heading > a { font-size:0; }
  .archive-heading > a span { font-size:13px; }
  .archive-grid { display:flex; gap:12px; margin:0 -18px; padding:0 18px 4px; overflow-x:auto; scroll-snap-type:x mandatory; scrollbar-width:none; }
  .archive-grid::-webkit-scrollbar { display:none; }
  .archive-card { min-width:82%; min-height:196px; scroll-snap-align:start; }
  .reader-header { padding: 0 14px; }
  .report-admin-grid { grid-template-columns: 1fr; }
  .assistant-main { padding: 22px 16px 70px; }
  .assistant-hero { min-height: 210px; padding: 30px 24px; }
  .ai-visual { position: absolute; right: -90px; opacity: .55; }
  .assistant-hero > div:first-child { max-width: 78%; }
  .mode-grid, .suggestion-columns { grid-template-columns: 1fr; }
  .mode-card { min-height: 125px; padding: 18px; grid-template-columns: 52px 1fr auto; }
  .mode-icon { width: 50px; height: 50px; }
  .assistant-message, .user-message { max-width: 94%; }
  .document-entry { grid-template-columns: 70px 1fr; padding: 20px; }
  .document-art { width: 62px; height: 76px; }
  .document-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .document-actions b { text-align: left; }
  .landing-recent #recentQuestions { grid-template-columns: 1fr; }
  .qa-workspace, .document-workspace { padding: 0 12px 30px; }
  .qa-settings, .qa-chat { border-radius: 16px; }
  .process-settings { grid-template-columns: 1fr; }
  .task-buttons { grid-template-columns: 1fr; }
  .qa-refined-shell { padding: 0 16px 40px; }
  .qa-control-bar { flex-wrap: wrap; padding: 12px 0; }
  .qa-control-bar select { flex: 1; min-width: 140px; }
  .qa-library-multiselect { flex:1; min-width:180px; }
  .qa-library-panel { width:min(320px,calc(100vw - 32px)); }
  .qa-connection { width: 100%; margin: 0; justify-content: center; }
  .selected-document { grid-template-columns: 42px 1fr; }
  .library-success, .replace-document { grid-column: 2; }
  .document-flow-title { align-items: center; }
  .primary-upload-button { min-width: 124px; }
  .qa-bottom-dock { padding-left: 14px; padding-right: 14px; }
}

/* Figma mobile homepage · 390 × 844 */
@media (max-width: 680px) {
  html:has(.home-page), body.home-page { width:100%; height:100%; overflow:hidden; }
  .home-page { min-height:100dvh; padding:0; color:#111820; background:#f8fbfc; font-family:"Noto Sans SC","Source Han Sans SC","Microsoft YaHei",sans-serif; }
  .home-page .app-header { position:fixed; inset:0 0 auto; z-index:20; height:100px; border:0; background:#f8fbfc; backdrop-filter:none; }
  .home-page .app-header-inner { box-sizing:border-box; height:100%; padding:24px 22px 6px; }
  .home-page .app-brand { gap:0; }
  .home-page .app-brand .brand-mark { display:none; }
  .home-page .app-brand strong { font-size:34px; font-weight:700; line-height:1.2; letter-spacing:-1.2px; }
  .home-page .app-brand small { display:block; margin-top:4px; color:#68798b; font-size:14px; white-space:nowrap; }
  .home-page .app-brand small.desktop-home-copy,.home-page .desktop-home-copy,.home-page .desktop-report-title,.home-page .desktop-archive-link,.home-page .desktop-nav-icon { display:none!important; }
  .home-page .mobile-home-copy,.home-page .mobile-report-title { display:inline!important; }
  .home-page .header-search { width:82px; height:42px; display:flex; align-items:center; justify-content:center; gap:8px; flex:none; padding:0; border:1px solid #dbe8eb; border-radius:21px; color:#29404a; background:#fff; box-shadow:0 6px 18px rgba(18,38,51,.08); font-size:13px; }
  .home-page .header-search::before { content:none; }
  .home-page .header-search img { width:18px; height:18px; }
  .home-page .header-search img,.home-page .header-search span { display:block; }
  .home-page .home-main { position:fixed; inset:112px 16px 116px; display:grid; grid-template-rows:minmax(0,468px) 136px; gap:12px; max-width:none; margin:0; padding:0; }
  .home-page .home-intro { display:none; }
  .home-page .report-stack { min-height:0; display:grid; grid-template-columns:1fr; grid-template-rows:repeat(2,minmax(0,1fr)); gap:12px; }
  .home-page .home-report { position:relative; box-sizing:border-box; min-height:0; height:100%; overflow:hidden; padding:0; border:1px solid #fff; border-radius:24px; background:#eaf7f5; box-shadow:0 12px 28px rgba(20,41,56,.09); }
  .home-page .report-card-image { position:absolute; inset:0; background-position:center; background-size:cover; }
  .home-page .research-report .report-card-image { background-image:url('/assets/mobile-home/report-research.png'); }
  .home-page .news-report .report-card-image { background-image:url('/assets/mobile-home/report-news.png'); }
  .home-page .report-glaze { position:absolute; inset:0; background:linear-gradient(90deg,rgba(255,255,255,.94) 0%,rgba(255,255,255,.58) 50%,rgba(255,255,255,.05) 78%,transparent 100%); }
  .home-page .report-content { position:relative; z-index:2; box-sizing:border-box; width:72%; height:100%; display:flex; flex-direction:column; align-items:flex-start; padding:24px 0 24px 21px; }
  .home-page .home-report h2 { max-width:100%; margin:0 0 4px; overflow:hidden; color:#111820; font-size:26px; font-weight:700; line-height:1.4; text-overflow:ellipsis; white-space:nowrap; }
  .home-page .home-report p { max-width:100%; min-height:0; margin:0; overflow:hidden; color:#5f7183; font-size:13px; line-height:1.5; text-overflow:ellipsis; white-space:nowrap; }
  .home-page .report-tags { max-width:100%; display:flex; flex-wrap:nowrap; gap:7px; margin:13px 0 10px; overflow:hidden; }
  .home-page .report-tags span { min-width:58px; box-sizing:border-box; flex:none; padding:6px 8px; border-radius:15px; color:#0b9d82; background:rgba(255,255,255,.82); box-shadow:0 4px 12px rgba(20,41,56,.06); font-size:12px; font-weight:500; text-align:center; }
  .home-page .news-report .report-tags span { color:#367fc4; }
  .home-page .home-report a { min-width:120px; box-sizing:border-box; display:flex; align-items:center; justify-content:space-between; margin-top:auto; padding:10px 9px 10px 17px; border-radius:22px; color:#fff; background:rgba(11,157,130,.9); box-shadow:0 7px 18px rgba(13,89,82,.18); font-size:14px; font-weight:500; }
  .home-page .news-report a { background:rgba(54,127,196,.9); }
  .home-page .home-report a b { width:24px; height:24px; display:grid; place-items:center; border-radius:50%; background:rgba(255,255,255,.22); font-size:13px; font-weight:500; }
  .home-page .report-orb,.home-page .report-kicker,.home-page .report-content > small { display:none; }
  .home-page .archive-section { position:relative; box-sizing:border-box; height:136px; margin:0; overflow:hidden; padding:18px 20px; border:1px solid rgba(201,224,224,.78); border-radius:22px; background:linear-gradient(130deg,#f6fcfb 7%,#ecf7f4 54%,#e4f0f6 93%); box-shadow:0 10px 28px -2px rgba(9,33,43,.1),inset 0 1px rgba(255,255,255,.72); }
  .home-page .archive-section::before,.home-page .archive-section::after { content:""; position:absolute; border-radius:50%; pointer-events:none; }
  .home-page .archive-section::before { width:126px; height:126px; right:-30px; top:-58px; border:1px solid rgba(255,255,255,.6); background:rgba(255,255,255,.18); }
  .home-page .archive-section::after { width:72px; height:72px; right:20px; top:-31px; border:1px solid rgba(15,153,127,.12); }
  .home-page .archive-heading { position:relative; z-index:1; height:100%; display:block; margin:0; }
  .home-page .archive-heading > div { padding-left:14px; }
  .home-page .archive-heading > div::before { content:""; position:absolute; left:0; top:3px; width:4px; height:22px; border-radius:2px; background:#059678; }
  .home-page .archive-kicker { position:absolute; left:14px; top:70px; display:block; color:#0a8069; font-size:10px; font-weight:500; letter-spacing:.08em; }
  .home-page .archive-heading h2 { margin:0; color:#0e1f29; font-size:20px; font-weight:700; line-height:1.4; }
  .home-page .archive-heading p { margin:5px 0 0; color:#576e7a; font-size:12px; white-space:nowrap; }
  .home-page .archive-open { position:absolute; inset:0; width:100%; border:0; color:#3d5e66; background:transparent; cursor:pointer; }
  .home-page .archive-open { display:block; }
  .home-page .archive-open span { position:absolute; right:55px; bottom:14px; font-size:11px; font-weight:500; }
  .home-page .archive-open b { position:absolute; right:0; bottom:0; width:42px; height:42px; display:grid; place-items:center; border-radius:50%; color:#fff; background:linear-gradient(#0bad8c,#05826e); box-shadow:0 7px 16px rgba(3,76,63,.22),inset 0 1px rgba(255,255,255,.3); font-size:17px; font-weight:500; }
  .home-page .archive-grid { display:none; }
  .home-page .bottom-nav { position:fixed; inset:auto 12px max(20px,env(safe-area-inset-bottom)); z-index:30; width:auto; height:78px; display:grid; grid-template-columns:repeat(5,1fr); transform:none; overflow:visible; border:1px solid rgba(212,227,232,.9); border-radius:28px; background:linear-gradient(180deg,rgba(255,255,255,.99),rgba(247,252,255,.97) 70%,rgba(242,250,252,.96)); box-shadow:0 10px 30px rgba(13,33,46,.16); backdrop-filter:blur(12px); }
  .home-page .bottom-nav a { position:relative; height:62px; align-self:center; gap:7px; border-radius:19px; color:#708092; }
  .home-page .bottom-nav a.active { margin:0 7px; color:#0aa486; background:linear-gradient(90deg,#e8faf5,#dbf5f0); }
  .home-page .bottom-nav a span { position:relative; width:22px; height:22px; display:block; font-size:0; }
  .home-page .bottom-nav a span > img { position:relative; z-index:2; width:100%; height:100%; display:block; }
  .home-page .bottom-nav a b { font-size:11px; font-weight:500; line-height:1; }
  .home-page .bottom-nav a.active b { font-weight:700; }
  .home-page .bottom-nav .ai-nav { height:68px; align-self:start; justify-content:flex-start; margin-top:0; color:#335278; }
  .home-page .bottom-nav .ai-nav span { width:44px; height:44px; display:grid; place-items:center; flex:none; margin:0; border-radius:50%; background:linear-gradient(90deg,#1cbfab,#3391d4 50%,#6e61d1); box-shadow:0 7px 16px rgba(38,128,184,.28); }
  .home-page .bottom-nav .ai-nav span > img { position:relative; z-index:2; width:30px; height:30px; }
  .home-page .bottom-nav .ai-nav span .ai-halo { display:none; }
  .home-page .bottom-nav .ai-nav b { margin-top:4px; }
  .mobile-archive-sheet { position:fixed; inset:0; z-index:80; display:flex; align-items:flex-end; padding:16px; background:rgba(13,29,38,.38); backdrop-filter:blur(6px); }
  .mobile-archive-panel { width:100%; max-height:76dvh; display:flex; flex-direction:column; overflow:hidden; border:1px solid rgba(214,230,231,.9); border-radius:28px; background:#f8fbfc; box-shadow:0 24px 64px rgba(7,25,36,.28); }
  .mobile-archive-panel > header { display:flex; align-items:center; justify-content:space-between; padding:20px 20px 14px; border-bottom:1px solid #e3ecee; }
  .mobile-archive-panel header small { color:#07836d; font-size:10px; font-weight:700; letter-spacing:.14em; }
  .mobile-archive-panel header h2 { margin:2px 0 0; font-size:23px; }
  .mobile-archive-panel header button { width:38px; height:38px; border:0; border-radius:50%; color:#526a75; background:#edf3f4; font-size:25px; }
  .mobile-archive-list { display:grid; gap:10px; padding:14px 16px 24px; overflow-y:auto; }
  .mobile-archive-item { min-width:0; display:grid; grid-template-columns:40px minmax(0,1fr) 26px; align-items:center; gap:12px; padding:15px; border:1px solid #e0eaea; border-radius:18px; background:#fff; box-shadow:0 5px 16px rgba(28,64,74,.05); }
  .mobile-archive-item > span { width:40px; height:40px; display:grid; place-items:center; border-radius:13px; color:#fff; background:linear-gradient(145deg,#27b795,#119373); font-size:13px; font-weight:700; }
  .mobile-archive-item.archive-news > span { background:linear-gradient(145deg,#55a7e3,#337fc2); }
  .mobile-archive-item small,.mobile-archive-item b,.mobile-archive-item p { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .mobile-archive-item small { color:#178c74; font-size:10px; }
  .mobile-archive-item b { margin-top:3px; color:#172631; font-size:14px; }
  .mobile-archive-item p { margin:2px 0 0; color:#748590; font-size:11px; }
  .mobile-archive-item > i { color:#0b987e; font-size:20px; font-style:normal; }
  body.archive-sheet-open { overflow:hidden; }
}

@media (max-width:680px) and (max-height:820px) {
  .home-page .app-header { height:92px; }
  .home-page .app-header-inner { padding-top:17px; }
  .home-page .app-brand strong { font-size:30px; }
  .home-page .home-main { top:100px; bottom:102px; grid-template-rows:minmax(0,1fr) 116px; gap:9px; }
  .home-page .report-stack { gap:9px; }
  .home-page .report-content { padding-top:15px; padding-bottom:15px; }
  .home-page .home-report h2 { font-size:22px; }
  .home-page .report-tags { margin:8px 0 6px; }
  .home-page .home-report a { padding-top:7px; padding-bottom:7px; }
  .home-page .archive-section { height:116px; padding-top:13px; }
  .home-page .archive-heading p { margin-top:2px; }
  .home-page .archive-kicker { top:62px; }
  .home-page .bottom-nav { height:70px; bottom:max(12px,env(safe-area-inset-bottom)); }
}

/* Mobile knowledge Q&A workspace */
@media (min-width:0px) {
  html:has(.qa-refined-page){background:#eaf0f2}
  body.qa-refined-page{width:min(100%,430px);max-width:430px;margin:0 auto;overflow-x:hidden;box-shadow:0 0 38px rgba(18,42,54,.13)}
  .qa-refined-page{padding-bottom:104px;background:#f8fafc}
  .qa-refined-header{position:sticky;height:64px;padding:0 16px;grid-template-columns:36px minmax(0,1fr) auto;gap:10px}
  .qa-refined-header button{width:36px;height:36px;font-size:24px}
  .qa-refined-header b{overflow:hidden;font-size:18px;line-height:24px;text-overflow:ellipsis;white-space:nowrap}
  .qa-refined-header a{font-size:12px;line-height:18px;white-space:nowrap}
  .qa-refined-shell{width:100%;max-width:none;margin:0;padding:0 16px 112px;overflow:visible}
  .qa-control-bar{display:grid;min-height:0;padding:12px 0;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
  .qa-control-bar select{display:block;width:100%;max-width:none;min-width:0;height:40px;padding:0 28px 0 11px;border-radius:10px;font-size:12px}
  .qa-library-multiselect{width:auto;min-width:0}
  .qa-library-multiselect>button{height:40px;padding:0 28px 0 11px;overflow:hidden;border-radius:10px;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
  .qa-library-multiselect>button::after{right:10px;top:7px}
  .qa-library-panel{position:fixed;left:16px;right:16px;top:116px;width:auto;max-height:min(62dvh,430px)}
  .qa-web-search-toggle{width:100%;min-width:0;height:40px;padding:0 9px;justify-content:center;border-radius:10px;font-size:11px;white-space:nowrap}
  .qa-web-search-toggle input{width:15px;height:15px}
  .qa-connection{grid-column:1/-1;width:100%;min-height:28px;margin:0;justify-content:center;font-size:12px}
  .inline-document-flow{padding:18px 0 16px}
  .document-flow-title{align-items:center;gap:10px}
  .document-flow-title>div{min-width:0;gap:8px}
  .document-flow-title>div b{font-size:15px;line-height:21px}
  .upload-line-icon{width:28px;height:28px;flex:0 0 28px;font-size:16px}
  .primary-upload-button{min-width:106px;height:38px;padding:0 12px;border-radius:10px;font-size:12px;white-space:nowrap}
  .selected-document{grid-template-columns:40px minmax(0,1fr);gap:10px;margin-top:12px;padding:13px 0}
  .mini-pdf-icon{width:38px;height:48px}
  .selected-document>div{min-width:0}
  .selected-document>div b{display:-webkit-box;overflow:hidden;font-size:13px;line-height:19px;overflow-wrap:anywhere;-webkit-box-orient:vertical;-webkit-line-clamp:2}
  .selected-document>div small{font-size:11px;line-height:17px}
  .library-success,.replace-document{grid-column:2;font-size:11px;line-height:18px;white-space:normal}
  .document-inline-actions{gap:10px;margin-top:12px}
  .translation-choice-group{padding:10px;border-radius:12px}
  .translation-choice-group>div{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .document-inline-actions .translation-section-button{height:36px;padding:0 5px;font-size:11px}
  .document-inline-actions .quick-read-action{min-height:44px;font-size:13px}
  .document-processing-status{padding:12px;font-size:12px}
  .qa-greeting{padding:38px 8px}
  .qa-greeting h1{font-size:20px}
  .qa-greeting p{font-size:13px;line-height:21px}
  .quick-prompts{flex-wrap:wrap}
  .refined-chat-messages{padding:12px 0}
  .assistant-message,.user-message{max-width:92%;font-size:13px;line-height:1.7}
  .qa-bottom-dock{width:min(100%,430px);padding:8px 12px calc(8px + env(safe-area-inset-bottom))}
  .qa-refined-composer{min-width:0;grid-template-columns:minmax(0,1fr) 26px 42px;gap:4px;padding:6px;border-radius:18px}
  .qa-refined-composer textarea{min-width:0;padding:9px 8px;font-size:13px;line-height:20px}
  .qa-refined-composer>span{font-size:18px}
  .qa-refined-composer button{width:42px;height:42px;font-size:18px}
  .qa-bottom-dock>p{display:none}
}

/* Mobile-only layouts for pages opened from mobile-v2. */
@media (min-width:0px) {
  html:has(.literature-reader-page),html:has(.product-subpage),html:has(.materials-page),html:has(.solution-page){background:#eaf0f2}
  body.literature-reader-page,body.product-subpage,body.materials-page,body.solution-page{width:min(100%,430px);max-width:430px;min-height:100dvh;margin:0 auto;overflow-x:hidden;box-shadow:0 0 38px rgba(18,42,54,.13)}

  .literature-reader-page{background:#f5f8fa}
  .literature-reader-page .reader-header{height:76px;padding:9px 16px;grid-template-columns:38px minmax(0,1fr);gap:10px}
  .literature-reader-page .reader-header>a{width:36px;height:36px;border-radius:50%;font-size:25px;line-height:1;text-decoration:none}
  .literature-reader-page .reader-header>div{min-width:0}
  .literature-reader-page .reader-header span{font-size:9px;line-height:13px}
  .literature-reader-page .reader-header h1{margin:1px 0;font-size:17px;line-height:23px}
  .literature-reader-page .reader-header small{font-size:10px;line-height:15px}
  .literature-reader-page .reader-shell{width:100%;margin:0;padding:12px 16px 28px}
  .literature-reader-page .reader-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}
  .literature-reader-page .reader-tabs button{height:42px;padding:0;border-radius:12px;font-size:13px}
  .literature-reader-page .preview-pane{border-radius:16px}
  .literature-reader-page .preview-pane>header{display:block;min-height:0;padding:14px;border-bottom:1px solid var(--line)}
  .literature-reader-page .preview-pane>header b{font-size:16px;line-height:22px}
  .literature-reader-page .preview-pane>header small{margin-top:3px;font-size:11px;line-height:17px;white-space:normal;overflow-wrap:anywhere}
  .literature-reader-page .pdf-preview-actions{display:grid;width:100%;margin-top:12px;grid-template-columns:1fr 1fr;gap:8px}
  .literature-reader-page .pdf-preview-actions label{grid-column:1/-1;grid-row:1;justify-content:center;height:38px;font-size:12px}
  .literature-reader-page .pdf-preview-actions [data-reader-page="prev"]{grid-column:1;grid-row:2}
  .literature-reader-page .pdf-preview-actions [data-reader-page="next"]{grid-column:2;grid-row:2}
  .literature-reader-page .pdf-preview-actions .translate-page-button{grid-column:1;grid-row:3}
  .literature-reader-page .pdf-preview-actions>a{grid-column:2;grid-row:3}
  .literature-reader-page .pdf-preview-actions .button{display:flex;min-width:0;height:38px;padding:0 8px;align-items:center;justify-content:center;border-radius:10px;font-size:12px;white-space:nowrap}
  .literature-reader-page .pdf-preview-actions input{width:48px;min-height:34px}
  .literature-reader-page .pdf-page-scroller{height:calc(100dvh - 330px);min-height:420px;padding:8px;background:#303236;scrollbar-width:none}
  .literature-reader-page .pdf-page-scroller::-webkit-scrollbar{display:none}
  .literature-reader-page .pdf-rendered-page{width:100%;min-height:480px;margin-bottom:10px;box-shadow:none}
  .literature-reader-page .quick-read-large-frame{height:calc(100dvh - 170px);min-height:560px}
  .literature-reader-page .page-translation-modal,.literature-reader-page .page-translation-modal.translation-only{width:100%;max-width:430px;max-height:92dvh;margin:auto auto 0;border-radius:22px 22px 0 0}
  .literature-reader-page .page-translation-body{padding:10px 12px 18px;font-size:13px;line-height:1.75}

  .product-subpage,.materials-page,.solution-page{background:#f5f8fa}
  .product-subpage .subpage-header,.materials-page .subpage-header,.solution-page .subpage-header{min-height:64px;padding:8px 16px;grid-template-columns:38px minmax(0,1fr) auto;gap:10px}
  .product-subpage .subpage-header>a:first-child,.materials-page .subpage-header>a:first-child,.solution-page .subpage-header>a:first-child{width:36px;height:36px;font-size:25px;text-decoration:none}
  .product-subpage .subpage-header>div,.materials-page .subpage-header>div,.solution-page .subpage-header>div{min-width:0}
  .product-subpage .subpage-header h1,.materials-page .subpage-header h1,.solution-page .subpage-header h1{overflow:hidden;margin-top:1px;font-size:17px;line-height:22px;text-overflow:ellipsis;white-space:nowrap}
  .product-subpage .subpage-text-link,.materials-page .subpage-header>small{font-size:11px;white-space:nowrap}
  .product-detail-shell,.materials-shell{width:100%;padding:14px 16px 34px}
  .detail-product-hero{position:relative;display:block;min-height:232px;padding:26px 22px;border-radius:20px;overflow:hidden}
  .detail-product-hero>div:first-child{position:relative;z-index:2}
  .detail-product-hero h2{max-width:285px;margin:8px 0 10px;font-size:28px;line-height:1.3}
  .detail-product-hero p{max-width:285px;margin:0;font-size:13px;line-height:1.7}
  .detail-product-hero a{margin-top:15px;padding:10px 16px;border-radius:10px;font-size:13px;text-decoration:none}
  .detail-symbol{position:absolute;right:-8px;bottom:-24px;display:block;opacity:.12;font-size:128px}
  .detail-tabs{gap:7px;margin:14px -16px;padding:0 16px 4px;scrollbar-width:none}
  .detail-tabs::-webkit-scrollbar{display:none}
  .detail-tabs button{flex:0 0 auto;min-width:96px;padding:9px 12px;font-size:12px}
  .detail-content-grid{grid-template-columns:1fr;gap:10px}
  .detail-content-grid article{padding:18px;border-radius:15px}
  .detail-content-grid h3{margin:7px 0;font-size:16px}
  .detail-content-grid p{margin:0;font-size:13px;line-height:1.65}
  .detail-content-grid a{display:inline-block;margin-top:10px;font-size:12px;text-decoration:none}
  .detail-safety{margin-top:12px;padding:15px 16px;font-size:12px}

  .materials-search{grid-template-columns:auto minmax(0,1fr) auto;gap:7px;padding:9px 10px;border-radius:13px}
  .materials-search input{min-width:0;font-size:12px}
  .materials-search button{padding:8px 12px;font-size:12px}
  .materials-tag-filters{grid-template-columns:1fr;gap:9px;margin-top:12px}
  .materials-filter-group{grid-template-columns:72px minmax(0,1fr);gap:8px}
  .materials-filter-group>b{font-size:12px}
  .materials-filter-group select,.public-tag-multiselect>button{min-height:40px;font-size:12px}
  .public-tag-filter-panel{position:fixed;z-index:50;left:16px;right:16px;top:118px;width:auto;max-height:65dvh;overflow:auto}
  .materials-grid{grid-template-columns:1fr;gap:10px;margin-top:14px}
  .material-card{padding:17px;border-radius:15px}
  .material-card h2{font-size:16px}
  .material-card p{font-size:12px;line-height:1.65}
  .solution-page .subpage-header>small{font-size:10px;white-space:nowrap}
  .solution-page .solution-detail-shell{width:100%;padding:14px 16px 28px}
  .solution-page .solution-html-frame{height:calc(100dvh - 94px);min-height:520px;border-radius:14px;box-shadow:none}
}
