:root {
  color-scheme: light;
  --ink: #1b3036; --muted: #56676c; --teal: #146b58; --teal-dark: #0d5546;
  --surface: #fff; --canvas: #f4f7f7; --border: #d8e2e3; --soft-border: #e9eeee;
  --own-input: #f0f8f1; --own-border: #b9d3c0; --supplier: #fff8e3;
  --supplier-border: #ddcea0; --total: #e6f3ed; --warm: #fffaf0; --error: #a93226;
  --radius: 8px; --focus: #17816c;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--canvas);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button, .button { transition: background-color 200ms cubic-bezier(.22,1,.36,1), color 200ms cubic-bezier(.22,1,.36,1); }
button:active { transform: translateY(1px); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p, dl { margin: 0; }
h1, h2, h3 { font-weight: 600; text-wrap: balance; }
h1 { font-size: 30px; line-height: 36px; letter-spacing: -.03em; }
h2 { font-size: 20px; line-height: 28px; }
h3 { font-size: 16px; line-height: 24px; }
p { text-wrap: pretty; }
small { font-size: 12px; font-weight: 400; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip: rect(0,0,0,0); overflow: hidden; white-space: nowrap; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 20; background: var(--teal); color: white; padding: 12px 24px; border-radius: var(--radius); }
.skip-link:focus { top: 12px; }
.app-header { display:flex;align-items:center;gap:32px;min-height:80px;padding:16px max(32px, calc((100vw - 1696px) / 2));background:white;border-bottom:1px solid var(--border); }
.brand { display:inline-flex;align-items:center;gap:12px;font-size:24px;font-weight:600;color:var(--ink);text-decoration:none;white-space:nowrap;letter-spacing:-.02em; }
.brand-mark { flex: 0 0 30px; width: 30px; height: 30px; background: url('./favicon.svg') center / contain no-repeat; border-radius: 8px; }
.app-header nav { display:flex;justify-content:center;align-items:center;flex:0 1 auto;gap:4px;margin-inline:auto;padding:4px;background:#f1f5f3;border:1px solid #e3eae6;border-radius:8px; }
.app-header nav a { padding:8px 16px;color:var(--muted);text-decoration:none;font-weight:500;border-radius:4px;white-space:nowrap; }
.app-header nav a:hover { background:#e4eee8;color:var(--teal-dark); }
.app-header nav a.active { background: var(--teal); color: white; }
main { max-width:1760px;margin:0 auto;padding:32px;outline:none; }
.page-heading { margin-bottom: 24px; }
.page-heading p { color: var(--muted); margin-top: 8px; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(300px, 1.12fr); gap: 24px; align-items: start; }
.main-column, .side-column { display: grid; gap: 16px; min-width: 0; }
.panel { padding:24px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);min-width:0;box-shadow:0 2px 8px #1b303603; }
.panel > h2 { margin-bottom: 16px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.panel-heading p { margin-top: 4px; font-size: 14px; color: var(--muted); }
.unit-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.profile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.profile-field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.profile-field > span { font-size: 14px; font-weight: 500; white-space: nowrap; }
.profile-field small { font-size: 12px; color: inherit; }
.input-wrap { position: relative; min-width: 0; }
input, select { width:100%;min-width:0;min-height:44px;border:1px solid var(--own-border);border-radius:4px;padding:8px 12px;color:var(--ink);background:var(--own-input);line-height:24px; }
input { font-variant-numeric: tabular-nums; }
input:hover { border-color: #7ba68a; }
input:focus, select:focus { border-color: var(--focus); background: white; outline: 2px solid #146b5833; outline-offset: 0; }
.supplier-input input, select { border-color: var(--supplier-border); background: var(--supplier); }
.supplier-input input:hover, select:hover { border-color: #a89761; }
input[aria-invalid="true"] { border-color: var(--error); background: #fff3f1; }
.input-suffix { position: absolute; right: 8px; top: 7px; font-size: 14px; pointer-events: none; color: var(--muted); }
.input-wrap:has(.input-suffix) input { padding-right: 24px; }
.field-error { display: block; color: var(--error); font-size: 12px; line-height: 16px; text-align: left; white-space: normal; }
.field-error:not(:empty) { margin-top: 4px; }
.summary-error:not(:empty) { margin: 0 0 12px; font-size: 14px; }
.form-actions { display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:24px; }
.form-actions p { color: var(--muted); font-size: 12px; max-width: 75%; }
.button { display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:8px 16px;border-radius:4px;border:1px solid transparent;font-size:14px;line-height:20px;font-weight:600;white-space:nowrap; }
.primary { background: var(--teal); color: white; border-color: var(--teal); min-width: 128px; }
.primary:hover { background: var(--teal-dark); }
.outline { background: white; border-color: var(--teal); color: var(--teal); }
.outline:hover { background: #edf4f1; }
table { border-collapse: separate; border-spacing: 0; width: 100%; table-layout: fixed; font-size: 14px; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
th, td { padding:8px 12px;border-bottom:1px solid var(--soft-border);border-right:1px solid #f0f3f3;line-height:24px;vertical-align:middle; }
tr:last-child > * { border-bottom: 0; }
tr > *:last-child { border-right: 0; }
thead th { padding-block:12px;background:#eef3f3;color:#344e53;font-weight:600; }
tbody th { font-weight: 500; text-align: left; }
tbody tr:nth-child(even) { background:#fafcfc; }
tbody tr:hover > th, tbody tr:hover > td { box-shadow:inset 0 0 0 999px #146b5805; }
td { text-align: right; font-variant-numeric: tabular-nums; }
table input { min-height:32px;padding:4px 8px;font-size:14px;line-height:20px; }
table select { min-height:32px;padding:4px 8px;font-size:14px;line-height:20px; }
table small { font-size: 12px; }
.comparison-table th:first-child { width: 30%; text-align: left; }
.comparison-table thead th:not(:first-child) { text-align: center; }
.comparison-table input { text-align: right; }
.comparison-table tr:first-child input { text-align: left; }
.comparison-table td[data-revenue$=".capped"] { text-align: right; }
.total-row > * { background:var(--total);color:#105f4e;font-weight:600;border-top:1px solid #c4dfd0; }
.total-row td { font-size: 18px; line-height: 28px; }
.calculation-status { font-size: 12px; color: var(--muted); }
.calculation-status:not(:empty) { margin-top: 12px; }
.error-status, .invalid-total { color: var(--error) !important; }
.summary-panel { padding-top:24px; }
.summary-panel > h2 { margin-bottom: 12px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
.summary-grid > div { min-width:0;padding:12px;border:1px solid #e0ebe5;background:#f6faf7;border-radius:4px; }
.summary-grid h3 { font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
.summary-grid p { font-size:20px;line-height:28px;font-weight:600;color:var(--teal);font-variant-numeric:tabular-nums;overflow-wrap:anywhere; }
.summary-grid small { display: block; font-size: 12px; color: var(--teal); font-weight: 400; }
.negative-notice { margin-top: 16px; color: var(--error); font-size: 14px; }
.chart-panel { padding-bottom: 24px; }
.bar-chart { padding-top: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(50px, .7fr) minmax(80px, 1.7fr) auto; align-items: center; gap: 12px; margin: 16px 0; font-size: 14px; }
.bar-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { position:relative;height:24px;min-width:0;background:#f1f5f3;border-radius:2px; }
.bar-zero { position: absolute; top: -8px; bottom: -8px; width: 1px; background: #bac7cb; }
.bar { display: block; height: 100%; position: absolute; background: #5baf8e; min-width: 0; border-radius: 2px; }
.bar-0 { background: #85bea1; }.bar-1 { background: #4b9e7f; }.bar-2 { background: #146b58; }
.bar-negative { background: #b05d4b; }
.bar-value { font-variant-numeric: tabular-nums; font-size: 14px; }
.chart-axis { display: flex; justify-content: space-between; margin-top: 16px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); padding-top: 4px; }
.chart-empty { min-height: 124px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; }
.note-panel p, .note-list { line-height:1.8;font-size:14px;color:#41585d; }
.note-list { margin: 0; padding-left: 20px; }
.note-list li + li { margin-top: 12px; }
.note-list li::marker { color: var(--teal); }
.warm-panel { background:var(--warm);border-color:#eadfbe;box-shadow:none; }
.warm-panel h2 { color: #795c1d; }
.warm-panel .note-list li::marker { color: #927126; }
.page-footnote { color: var(--muted); font-size: 12px; margin-top: 16px; }
.qualification-panel { margin-bottom: 16px; }
.inline-notice { background:#fff8e5;border:1px solid #eadfbd;color:#68541f;padding:12px 16px;border-radius:4px;font-size:14px;margin-bottom:16px; }
.inline-notice.has-failed { background:#fff0eb;border-color:#efd0c8;color:#963e2c; }
.qualification-invalid { background: #fff0eb !important; }
.qualification-invalid-select { border: 2px solid var(--error); background: #fff6f3; color: #84271e; }
.qualification-pending-select { color: var(--error); border-color: var(--error); }
.qualification-pending-select:focus, .qualification-invalid-select:focus { border-color: var(--error); }
.eligibility-badge { display: block; margin-top: 4px; font-size: 12px; line-height: 20px; font-weight: 500; color: var(--muted); }
.eligibility-badge.is-pending { color: var(--error); font-weight: 600; }
.company-name-invalid { display: inline-block; padding: 4px 8px; border-radius: 4px; color: var(--error); background: #ffe5df; font-weight: 700; }
.score-excluded { background: #f2f4f5 !important; }
.excluded-score-result { background: #eef1f3 !important; color: #66717a !important; }
.score-excluded input:disabled { background: #e8ecef; border-color: #cbd2d7; color: #66717a; cursor: not-allowed; opacity: 1; }
.button:disabled { background: #e8ecef; border-color: #cbd2d7; color: #66717a; cursor: not-allowed; }
.qualification-table th:first-child { width: 22%; text-align: left; }
.qualification-table th:nth-child(2) { width: 25%; text-align: left; }
.qualification-table td:nth-child(2) { text-align: left; color: var(--muted); }
.scoring-table th:first-child { width: 22%; text-align: left; }
.scoring-table thead th:nth-child(2) { width: 9%; }
.scoring-table thead th:nth-child(3) { width: 27%; text-align: left; }
.scoring-table td { text-align: center; }
.scoring-table input { text-align: center; }
.scoring-table .reference-cell { text-align: left; color: var(--muted); }
.scoring-table th[colspan] { text-align: left; }
.weight-total-row { font-weight: 600; }
.scoring-bottom { display: grid; grid-template-columns: 1.2fr 1fr auto; gap: 32px; align-items: center; margin-top: 20px; background: #f8fbfc; border: 1px solid var(--soft-border); border-radius: 4px; padding: 16px; }
.scoring-bottom p { font-size: 14px; margin-top: 8px; }
.scoring-bottom .bar-chart { padding-top: 0; }
.scoring-bottom .bar-row { margin: 8px 0; }
.scoring-bottom .bar-track { height: 16px; }
.scoring-bottom .chart-axis { margin-top: 8px; }
.scoring-bottom .chart-empty { min-height: 80px; }
.scope-line { padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 16px; font-size: 14px; background: #f8fafb; }
.parameter-table th:first-child { width: 22%; text-align: left; }
.parameter-table th:nth-child(2) { width: 12%; }
.parameter-table th:nth-child(3) { width: 40%; }
.parameter-table td, .parameter-table thead th { text-align: left; }
.parameter-table td:nth-child(2) { white-space: nowrap; }
.parameter-table td:last-child { color: var(--muted); }
.formula-list { margin: 0; padding: 0; list-style: none; counter-reset: formula; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.formula-list li { counter-increment: formula; display: flex; gap: 16px; align-items: baseline; padding: 8px 12px; font-size: 14px; overflow-wrap: anywhere; }
.formula-list li:nth-child(even) { background: #f7fafb; }
.formula-list li::before { content: counter(formula); color: var(--teal); font-weight: 600; min-width: 16px; }
.formula-panel .inline-notice { margin: 12px 0 0; }
.definitions-list { border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
.definitions-list > div { display: grid; grid-template-columns: 27% 1fr; font-size: 14px; }
.definitions-list > div + div { border-top: 1px solid var(--soft-border); }
.definitions-list dt { background: #edf6f1; padding: 8px 12px; font-weight: 500; }
.definitions-list dd { margin: 0; padding: 8px 12px; }
dialog { border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; width: min(760px, calc(100% - 32px)); max-height: 84vh; color: var(--ink); background: white; }
dialog::backdrop { background: #102c3b66; }
.dialog-header { display: flex; gap: 16px; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.dialog-header p { margin-top: 4px; color: var(--muted); font-size: 14px; }
.standards-list { display: grid; gap: 20px; }
.standards-list section { border: 1px solid var(--soft-border); border-radius: 4px; padding: 16px; }
.standards-list h3 { margin-bottom: 8px; }
.standards-list dl > div { display: flex; align-items: baseline; gap: 16px; padding: 4px 0; font-size: 14px; }
.standards-list dt { flex: 0 0 24px; color: var(--teal); font-weight: 600; }.standards-list dd { margin: 0; }
.mobile-comparison, .mobile-submit { display: none; }
.noscript { padding: 24px; }
@media (min-width: 1700px) {
  .profile-field > span, .profile-field small, table { font-size: 16px; }
  table input, table select { font-size: 16px; }
  th, td { padding: 8px 12px; }
  .summary-grid p { font-size: 24px; line-height: 32px; }
}
@media (max-width: 1240px) {
  .app-header { gap: 16px; padding-inline: 24px; }
  .brand { font-size: 20px; }
  .app-header nav { gap: 4px; }
  .app-header nav a { padding-inline: 12px; font-size: 14px; }
  main { padding: 24px; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .side-column { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; }
  .summary-grid p { font-size: 24px; line-height: 32px; }
}
@media (max-width: 920px) {
  .app-header { flex-wrap: wrap; gap: 12px; }
  .app-header nav { order: 3; flex-basis: 100%; justify-content: flex-start; }
  .app-header nav a { flex: 1; text-align: center; }
  .side-column { grid-template-columns: 1fr; }
  .side-column .chart-panel { max-width: none; }
  .bar-row { grid-template-columns: 110px 1fr 90px; }
  .note-panel .note-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px 24px; }
  .note-list li + li { margin-top: 0; }
  .scoring-bottom { grid-template-columns: 1fr 1fr; gap: 24px; }
  .scoring-bottom > button { grid-column: 1 / -1; justify-self: end; }
  .scoring-bottom .bar-row { grid-template-columns: 60px 1fr 48px; }
  .reference-cell { font-size: 12px; }
}
@media (max-width: 720px) {
  main { padding: 20px 16px 24px; }
  h1 { font-size: 24px; line-height: 32px; }
  .page-heading { margin-bottom: 20px; }.page-heading p { font-size: 14px; }
  .app-header { padding: 16px; gap: 16px; }
  .app-header nav { gap: 4px; }
  .app-header nav a { flex: 1 1 auto; font-size: 14px; padding: 12px 4px; }
  .brand { font-size: 20px; gap: 8px; }
  .brand-mark { flex-basis: 24px; width: 24px; height: 24px; }
  .panel { padding: 16px; }
  .panel h2 { font-size: 18px; line-height: 28px; }
  .profile-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px 12px; }
  .profile-field > span { font-size: 14px; white-space: normal; }
  .profile-field small { display: block; }
  input, select { min-height: 44px; font-size: 16px; }
  .button { min-height: 44px; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-actions > button { display: none; }
  .form-actions p { max-width: none; font-size: 12px; }
  .desktop-comparison { display: none; }.mobile-comparison { display: grid; gap: 16px; }
  .company-card { border: 1px solid var(--border); padding: 16px; border-radius: 4px; background: #fff; min-width: 0; }
  .company-card h3 { padding-bottom: 12px; font-size: 16px; color: var(--teal); overflow-wrap: anywhere; }
  .company-form { display: grid; gap: 12px; margin-bottom: 16px; }
  .company-form label { display: grid; gap: 4px; font-size: 14px; }
  .result-list > div { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 8px 0; font-size: 14px; border-top: 1px solid var(--soft-border); align-items: baseline; }
  .result-list dt { color: var(--muted); }.result-list small { display: block; font-size: 12px; }
  .result-list dd { margin: 0; font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
  .result-list .emphasis { color: var(--teal); font-weight: 700; }.result-list .emphasis dt { color: inherit; }
  .summary-grid { grid-template-columns: 1fr; gap: 12px; }
  .summary-grid p { font-size: 20px; line-height: 28px; }.summary-grid h3 { font-size: 12px; }
  .note-panel .note-list { display: block; }.note-list li + li { margin-top: 12px; }
  .bar-row { grid-template-columns: 64px minmax(0,1fr) auto; gap: 12px; }
  .mobile-submit { display: flex; position: sticky; bottom: 0; padding: 12px 0 max(12px,env(safe-area-inset-bottom)); background: var(--canvas); margin-top: 12px; z-index: 2; }
  .mobile-submit .button { width: 100%; }
  .inline-notice { font-size: 12px; }
  .compact-field { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(80px,1fr); align-items: center; gap: 12px; padding: 8px 0; font-size: 14px; }
  .company-card summary { font-weight: 600; color: var(--teal); cursor: pointer; padding: 4px 0; }
  .company-card summary span { float: right; }
  .mobile-score-result { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding: 12px; background: var(--total); color: var(--teal); border-radius: 4px; font-size: 14px; }
  .mobile-score-result strong { font-size: 20px; }
  .scoring-bottom { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 16px; }
  .scoring-bottom > button { grid-column: auto; justify-self: stretch; }
  .panel-heading { align-items: flex-start; flex-wrap: wrap; }
  .parameter-table, .parameter-table tbody { display: block; border: 0; }
  .parameter-table thead { display: none; }
  .parameter-table tr { display: block; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }
  .parameter-table tr + tr { margin-top: 12px; }
  .parameter-table tbody th { display: block; width: auto; padding: 12px; background: #edf6f1; border: 0; font-size: 16px; }
  .parameter-table td { display: grid; grid-template-columns: 64px 1fr; gap: 8px; width: auto; text-align: left; padding: 8px 12px; border: 0; }
  .parameter-table td::before { content: attr(data-label); color: var(--muted); font-size: 12px; }
  .parameter-table td:nth-child(2) { white-space: normal; }
  .formula-list li { gap: 8px; padding: 12px 8px; font-size: 14px; }
  .definitions-list > div { grid-template-columns: 1fr; }
  .definitions-list dt { padding: 8px 12px 4px; }.definitions-list dd { padding: 8px 12px 12px; }
  dialog { padding: 16px; }.dialog-header { gap: 8px; }.dialog-header h2 { font-size: 20px; }
  .page-footnote { font-size: 12px; }
}
@media (max-width: 380px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-field small { display: inline; }
  .summary-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
