:root {
  color-scheme: light;
  --ink: #18263d;
  --muted: #54647b;
  --blue: #2854a3;
  --blue-hover: #204686;
  --blue-soft: #eaf0fb;
  --blue-line: #d4dff1;
  --canvas: #f6f8fc;
  --white: #fff;
  --line: #e0e7f0;
  --line-strong: #ccd7e6;
  --shadow: 0 16px 48px #1f365a0d, 0 2px 8px #1f365a08;
  --container: 1192px;
  --gutter: clamp(20px, 4vw, 48px);
  --header: 64px;
  --radius: 16px;
  --large-radius: 24px;
  --ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(.2, .65, .25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header) + env(safe-area-inset-top) + 16px); }
body { margin: 0; background: var(--white); color: var(--ink); font: 16px/1.65 var(--ui); }
h1, h2, h3, h4, h5, p, figure, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4, h5 { line-height: 1.28; }
h2 { font-size: clamp(28px, 3.45vw, 42px); font-weight: 700; letter-spacing: -.04em; text-wrap: balance; }
h3 { font-size: 18px; font-weight: 700; }
a { color: var(--blue); text-underline-offset: .22em; }
img { display: block; max-width: 100%; height: auto; }
button, select { font: inherit; }
button, summary, select { cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
[hidden] { display: none !important; }
.wrap { width: min(var(--container), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.section { padding-block: clamp(56px, 7vw, 96px); }
.section-head { margin-bottom: 32px; }
.section-head > p, .report-head p { color: var(--muted); margin-top: 10px; }
.num, .flow-number, .cutoff-preview dd, .basket-count { font-variant-numeric: tabular-nums; }
.fine-print { color: var(--muted); font-size: 13px; }
.eyebrow { color: var(--blue); font-size: 13px; font-weight: 700; letter-spacing: .06em; }
.skip-link { position: fixed; z-index: 20; top: 8px; left: 8px; transform: translateY(-160%); padding: 10px 16px; background: var(--white); border-radius: 8px; }
.skip-link:focus { transform: translateY(0); }

.button, .text-link, .quiet-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; font-size: 14px; font-weight: 600; text-decoration: none;
}
.button {
  padding: 8px 16px; border: 1px solid transparent; border-radius: 10px;
  transition: background-color 180ms, border-color 180ms, color 180ms, box-shadow 180ms;
}
.primary { color: var(--white); background: var(--blue); border-color: var(--blue); box-shadow: 0 2px 4px #2046861c; }
.secondary { color: var(--ink); background: var(--white); border-color: var(--line-strong); }
.button:disabled { color: var(--muted); background: #eef2f8; border-color: var(--line); box-shadow: none; cursor: default; }
.text-link, .quiet-button { color: var(--blue); }
.quiet-button { padding: 4px 8px; border: 0; background: transparent; }
.text-link:hover, .quiet-button:hover { text-decoration: underline; }
@media (hover: hover) {
  .primary:hover:not(:disabled) { background: var(--blue-hover); border-color: var(--blue-hover); }
  .secondary:hover { background: var(--canvas); border-color: #aabbd3; }
}

.site-header {
  position: sticky; z-index: 5; top: 0;
  padding-top: env(safe-area-inset-top);
  border-bottom: 1px solid var(--line); background: var(--white);
  transition: background-color 200ms, box-shadow 200ms;
}
.site-header.scrolled { box-shadow: 0 3px 12px #1a35500a; background: #fcfdff; }
.header-inner { min-height: var(--header); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; justify-self: start; gap: 8px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.wordmark { font-size: 21px; font-weight: 700; letter-spacing: -.055em; line-height: 1; }
.brand-cn { padding-inline-start: 9px; border-inline-start: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; line-height: 1.3; }
.desktop-nav, .header-actions { display: flex; align-items: center; }
.desktop-nav { gap: clamp(8px, 2vw, 28px); }
.desktop-nav a, .mobile-menu nav a { display: flex; align-items: center; min-height: 44px; padding-inline: 5px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.desktop-nav a:hover, .mobile-menu nav a:hover { color: var(--blue); }
.header-actions { justify-self: end; gap: 8px; }
.mobile-menu { display: none; }
.mobile-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 8px; font-weight: 600; font-size: 14px; border-radius: 8px; }
summary::-webkit-details-marker { display: none; }
.menu-icon { width: 13px; height: 9px; border-block: 1.5px solid currentColor; }
.mobile-menu[open] .menu-icon { transform: rotate(-12deg); }
.mobile-menu[open] summary { background: var(--blue-soft); color: var(--blue); }
.mobile-menu nav { position: absolute; top: calc(100% + 8px); inset-inline: var(--gutter); padding: 8px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.mobile-menu nav a { padding: 8px 12px; border-radius: 8px; }
.mobile-menu nav a:hover { background: var(--canvas); }

.hero { padding-block: clamp(56px, 7.4vw, 112px); background: var(--canvas); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 55fr) minmax(0, 45fr); align-items: center; gap: clamp(24px, 4vw, 64px); }
.hero-copy .eyebrow { display: flex; align-items: center; gap: 8px; }
.eyebrow-dot { width: 7px; height: 7px; background: var(--blue); border-radius: 50%; }
.hero h1 { margin-block: 16px; font-size: clamp(42px, 4.15vw, 56px); font-weight: 700; line-height: 1.16; letter-spacing: -.055em; }
.hero h1 span { color: var(--blue); }
.hero-description { max-width: 34em; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-actions .button { min-height: 48px; }

.hero-product {
  padding: clamp(12px, 1.7vw, 24px); border: 1px solid var(--blue-line); border-radius: var(--large-radius);
  background-color: #edf2fa; background-image: radial-gradient(#bdcde6 0.65px, transparent 0.65px); background-size: 12px 12px;
}
.hero-product-frame { overflow: hidden; background: var(--white); border: 1px solid #cdd9ea; border-radius: 16px; box-shadow: var(--shadow); }
.product-top, .demo-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.product-brand { display: flex; align-items: center; gap: 8px; font-size: 15px; letter-spacing: -.025em; }
.preview-label { border: 1px solid var(--blue-line); border-radius: 6px; padding: 2px 8px; color: var(--blue); background: var(--blue-soft); font-size: 13px; font-weight: 600; white-space: nowrap; }
.product-bottom { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--canvas); font-size: 13px; }
.preview-action { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-inline-start: auto; font-size: 13px; font-weight: 700; text-decoration: none; }
.preview-action:hover { text-decoration: underline; }
.stack-icon { flex: 0 0 17px; width: 17px; height: 15px; border: 1.5px solid var(--blue); border-radius: 3px; box-shadow: 2px 2px 0 var(--blue-line); background: var(--white); }

.flow-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); list-style: none; border: 1px solid var(--line); border-radius: var(--radius); }
.flow-list li { position: relative; padding: 24px; }
.flow-list li + li { border-inline-start: 1px solid var(--line); }
.flow-number { display: inline-flex; color: var(--blue); font-weight: 700; font-size: 14px; }
.flow-list h3 { margin-top: 8px; }
.flow-list p { color: var(--muted); margin-top: 8px; font-size: 15px; }
.flow-visual { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 16px; min-height: 34px; color: var(--muted); font-size: 13px; }
.flow-topics span, .flow-filters span { padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--canvas); }
.flow-topics .selected { color: var(--blue); background: var(--blue-soft); border-color: var(--blue-line); font-weight: 700; }
.flow-filters b, .flow-print strong { color: var(--ink); margin-left: 3px; }
.flow-print { gap: 9px; }

.demo-section { background: var(--canvas); border-block: 1px solid var(--line); }
.demo-app { overflow: hidden; background: var(--white); border: 1px solid var(--line-strong); border-radius: var(--large-radius); box-shadow: var(--shadow); }
.demo-top { padding: 16px 24px; }
.demo-workspace { display: grid; grid-template-columns: minmax(166px, .68fr) minmax(0, 2.1fr) minmax(190px, 1fr); }
.demo-filters, .demo-results, .demo-basket { min-width: 0; padding: clamp(14px, 2vw, 24px); }
.demo-filters, .demo-basket { background: #f8fafd; }
.demo-filters { border-right: 1px solid var(--line); }
.demo-basket { border-left: 1px solid var(--line); }
.demo-workspace h3 { font-size: 16px; }
.demo-filters label { display: grid; gap: 4px; margin-top: 12px; color: var(--muted); font-size: 13px; font-weight: 600; }
.demo-filters select { width: 100%; min-height: 44px; padding: 4px 6px; background: var(--white); color: var(--ink); border: 1px solid var(--line-strong); border-radius: 8px; font-size: 14px; }
.filter-reset { margin-top: 8px; }
.demo-results-head, .demo-basket-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.demo-results-head span { font-size: 13px; color: var(--muted); }
.demo-question-list, .demo-basket-list { list-style: none; display: grid; gap: 8px; }
.demo-question { background: var(--white); border: 1px solid var(--line); border-radius: 10px; }
.demo-question.is-selected { border-color: #bacde9; }
.demo-question-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 10px 12px; }
.demo-question h4 { margin-block: 4px; font-size: 15px; }
.demo-question-tags { color: var(--muted); font-size: 13px; }
.demo-toggle { white-space: nowrap; padding-inline: 10px; }
.demo-toggle[aria-pressed=true] { color: var(--blue); background: var(--blue-soft); border-color: var(--blue-line); }
.demo-stem { border-top: 1px solid var(--line); padding-inline: 12px; font-size: 14px; }
.demo-stem summary { display: flex; align-items: center; min-height: 44px; gap: 8px; list-style: none; color: var(--blue); font-size: 13px; font-weight: 600; }
.demo-stem summary::before, .report-details summary::after { content: "+"; font-size: 18px; line-height: 1; }
.demo-stem[open] summary::before, .report-details[open] summary::after { content: "−"; }
.demo-stem .question-content { padding-bottom: 12px; }
.question-content p { margin-block: 0 8px; }
.question-content ol { list-style: upper-alpha inside; }
.question-content img { width: 100%; border: 1px solid var(--line); border-radius: 6px; }
.basket-count { display: inline-flex; padding: 1px 8px; background: var(--blue-soft); color: var(--blue); border-radius: 6px; font-size: 13px; font-weight: 700; }
.demo-basket-list li { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 4px; padding: 8px 4px 8px 10px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.demo-basket-list small { display: block; color: var(--muted); font-size: 13px; }
.basket-remove { width: 44px; padding-inline: 0; }
.demo-basket .primary { width: 100%; margin-top: 12px; }
.demo-empty, .demo-note { color: var(--muted); font-size: 13px; }
.demo-note { margin-top: 8px; }
.demo-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 16px; padding: 8px 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.demo-fallback { padding: 16px 24px; }

.contact-section { padding-top: 0; }
.contact-card { display: grid; grid-template-columns: minmax(0, 1fr) 244px; align-items: center; gap: clamp(24px, 6vw, 88px); padding: clamp(24px, 4vw, 56px); background: #eef3fb; border: 1px solid var(--blue-line); border-radius: var(--large-radius); }
.contact-copy > p { margin-top: 10px; color: var(--muted); }
.contact-steps { display: grid; gap: 14px; margin-top: 24px; list-style: none; }
.contact-steps li { display: flex; align-items: flex-start; gap: 12px; }
.contact-steps li > span { flex: 0 0 26px; display: grid; place-items: center; height: 26px; color: var(--blue); background: #e1eafa; border-radius: 50%; font-size: 13px; font-weight: 700; }
.contact-steps p { margin-top: 2px; color: var(--muted); font-size: 14px; }
.qr-card { padding: 16px 16px 8px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; }
.qr-card img { width: min(100%, 192px); aspect-ratio: 1; object-fit: contain; margin-inline: auto; }
.qr-card figcaption { display: grid; justify-items: center; margin-top: 8px; }
.qr-card figcaption span { color: var(--muted); font-size: 14px; }
.site-footer { padding-block: 24px calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap; }
.footer-inner p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.footer-inner nav { display: flex; gap: 0 18px; flex-wrap: wrap; }
.footer-inner nav a { display: flex; align-items: center; gap: 4px; min-height: 44px; color: var(--muted); font-size: 14px; text-decoration: none; }
.footer-inner nav a:hover { color: var(--blue); text-decoration: underline; }

.worksheet-dialog { width: min(690px, calc(100% - 2 * var(--gutter))); max-height: 90dvh; max-width: none; padding: 0; color: var(--ink); background: var(--canvas); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow); }
.worksheet-dialog::backdrop { background: #18263d66; }
.worksheet-toolbar, .worksheet-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; }
.worksheet-actions { flex-wrap: wrap; justify-content: flex-end; }
.worksheet-page { margin-inline: 16px; padding: clamp(14px, 3vw, 30px); background: var(--white); border: 1px solid var(--line); border-radius: 8px; }
.worksheet-page h2 { font-size: 24px; text-align: center; }
.worksheet-meta { margin: 4px 0 16px; text-align: center; color: var(--muted); font-size: 13px; }
.worksheet-page > ol { list-style: none; counter-reset: question; }
.worksheet-page > ol > li { padding-block: 12px; border-top: 1px solid var(--line); counter-increment: question; }
.worksheet-page h3 { margin-bottom: 6px; font-size: 15px; }
.worksheet-page h3::before { content: counter(question) ". "; }

@media (max-width: 820px) {
  .desktop-nav { display: none; }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .mobile-menu { display: block; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { max-width: 600px; }
  .hero-product { width: min(100%, 580px); }
  .demo-workspace { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .demo-filters { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 0 12px; border: 0; border-bottom: 1px solid var(--line); }
  .demo-filters h3 { grid-column: 1 / -1; }
  .demo-filters .filter-reset { align-self: end; }
  .flow-list li { padding: 16px; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: clamp(34px, 9.4vw, 40px); }
  .hero-description { font-size: 16px; }
  .hero { padding-block: 40px; }
  .header-bank { padding-inline: 9px; gap: 4px; }
  .header-actions { gap: 3px; }
  .header-inner .brand { gap: 6px; }
  .header-inner .brand img { width: 26px; }
  .header-inner .wordmark { font-size: 18px; }
  .header-inner .brand-cn { padding-inline-start: 6px; }
  .flow-list, .demo-workspace, .contact-card { grid-template-columns: minmax(0, 1fr); }
  .flow-list li + li { border-inline-start: 0; border-top: 1px solid var(--line); }
  .flow-list li { padding: 16px 16px 16px 54px; }
  .flow-number { position: absolute; left: 16px; top: 19px; }
  .flow-list h3 { margin-top: 0; }
  .flow-visual { margin-top: 10px; }
  .demo-top, .demo-footer { padding-inline: 16px; }
  .demo-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .demo-basket { border-left: 0; border-top: 1px solid var(--line); }
  .contact-card { justify-items: start; }
  .qr-card { width: min(244px, 100%); justify-self: center; }
}
@media (max-width: 360px) {
  :root { --gutter: 16px; }
  .header-inner .brand-cn { display: none; }
}

@keyframes portal-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes portal-fade { from { opacity: .5; } to { opacity: 1; } }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: portal-rise 460ms var(--ease) both; }
  .hero-copy h1 { animation-delay: 35ms; }
  .hero-description { animation-delay: 65ms; }
  .hero-actions { animation-delay: 95ms; }
  .hero-product { animation: portal-rise 520ms var(--ease) both; }
  .revealed { animation: portal-rise 370ms var(--ease) both; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
}
@media print {
  body:has(.worksheet-dialog[open]) > :not(.worksheet-dialog) { display: none !important; }
  .worksheet-dialog[open] { position: static; display: block; width: auto; max-height: none; overflow: visible; margin: 0; border: 0; box-shadow: none; background: white; }
  .worksheet-dialog::backdrop, .worksheet-toolbar, .worksheet-actions { display: none; }
  .worksheet-page { padding: 0; margin: 0; border: 0; }
  .worksheet-page li { break-inside: avoid; }
  .worksheet-page img { max-height: 180mm; object-fit: contain; object-position: left; border: 0; }
}

.basket-shortcut { justify-content: start; margin-bottom: 8px; font-size: 13px; }
@media (min-width: 601px) { .basket-shortcut:not(:focus) { display: none; } }

/* Public tools homepage */
.tools-hero { padding-block: clamp(45px, 6.3vw, 92px); }
.tools-hero h1 { font-size: clamp(35px, 3.8vw, 54px); }
.tools-hero h1 span { text-wrap: balance; }
.score-preview-result {
  display: grid; grid-template-columns: 1.04fr 1fr; align-items: end; gap: 10px 16px;
  padding: 16px; color: #fff; background: #14263e;
}
.score-preview-result p { font-size: 13px; color: #c9d9ef; }
.score-preview-result strong { display: block; margin-top: 4px; font-size: clamp(25px, 4.2vw, 46px); line-height: 1; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.score-preview-result > div:nth-child(2) strong { font-size: clamp(22px, 2.7vw, 30px); }
.score-preview-result small { font-size: 13px; font-weight: 600; letter-spacing: 0; }
.score-preview-scale { grid-column: 1 / -1; position: relative; height: 7px; margin-block: 4px 2px; border-radius: 99px; background: #485f7c; }
.score-preview-scale span { display: block; width: 51.75%; height: 100%; border-radius: inherit; background: #94b9fa; }
.score-preview-scale i { position: absolute; top: -3px; left: 43.625%; height: 13px; border-left: 2px solid #fff; }
.score-preview-list { padding: 12px 16px 6px; }
.score-preview-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.score-preview-filter span { padding: 2px 7px; color: var(--blue); background: var(--blue-soft); border-radius: 5px; font-size: 13px; font-weight: 600; }
.score-preview-list dl > div { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: 7px 10px; padding-block: 7px; border-top: 1px solid var(--line); font-size: 13px; }
.score-preview-list dt { font-weight: 700; }
.score-preview-list dd:first-of-type { font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; white-space: nowrap; }
.score-preview-list dd:last-child { color: var(--muted); font-size: 12px; white-space: nowrap; }
.score-preview-list small { font-size: 12px; font-weight: 400; }
.score-preview .product-bottom { color: var(--muted); }
.tools-section { padding-block: clamp(32px, 5vw, 64px); border-bottom: 1px solid var(--line); }
.tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tool-entry { padding: clamp(18px, 3vw, 30px); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.tool-entry:first-child { background: #eef4ff; border-color: var(--blue-line); }
.tool-entry h2 { margin-top: 6px; font-size: clamp(22px, 2.8vw, 32px); }
.tool-entry p:not(.eyebrow) { color: var(--muted); font-size: 15px; margin-top: 8px; }
.tool-entry .text-link { margin-top: 6px; }
.report-section + .workflow { border-top: 1px solid var(--line); }
.demo-section + .contact-section { padding-top: clamp(42px, 6vw, 80px); }

@media (max-width: 900px) {
  .desktop-nav { display: none; }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .mobile-menu { display: block; }
}
@media (max-width: 600px) {
  .tools-hero h1 { font-size: clamp(32px, 8.4vw, 39px); }
  .tools-grid { grid-template-columns: minmax(0, 1fr); }
  .score-preview-result strong { font-size: 38px; }
  .score-preview-list dl > div { gap: 6px 8px; }
}
