:root {
  --teal: #08796e;
  --teal-dark: #08685f;
  --ink: #102d3b;
  --body: #536575;
  --muted: #71818b;
  --line: #dfe8eb;
  --wash: #f4f8f8;
  --soft: #edf6f3;
  --danger: #b4453b;
  --radius: 15px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--wash); color: var(--ink); font: 14px/1.65 "Microsoft YaHei", "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a, input, select, summary { outline-offset: 4px; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; color: #849198; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #76b9af; }
a { color: inherit; text-decoration: none; }
button { -webkit-tap-highlight-color: transparent; }
svg.icon { width: 17px; height: 17px; flex: 0 0 auto; vertical-align: middle; }
.hidden { display: none !important; }
.skip-link { position: fixed; left: 20px; top: -70px; z-index: 10; padding: 10px 18px; background: white; border: 1px solid var(--teal); border-radius: 6px; }
.skip-link:focus { top: 12px; }
.header { background: #fff; border-bottom: 1px solid #e6eeee; }
.header-inner, .container { width: 100%; max-width: 1120px; margin: 0 auto; padding-right: 24px; padding-left: 24px; }
.header-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { display: grid; place-items: center; flex: 0 0 auto; width: 37px; height: 37px; border-radius: 10px; color: white; background: linear-gradient(130deg, #087b72, #075e58); box-shadow: inset 0 0 0 1px #ffffff20, 0 2px 4px #0b706d16; font: 600 33px/1 "Segoe UI", sans-serif; }
.brand strong { display: block; font-size: 17px; line-height: 1.5; letter-spacing: .3px; }
.brand small { display: block; color: #667785; font: 10px/1.8 "Segoe UI", sans-serif; letter-spacing: 2px; }
.header-tools { display: flex; align-items: center; gap: 19px; }
.research-pill { display: inline-flex; align-items: center; gap: 8px; color: var(--body); font-size: 12px; white-space: nowrap; }
.research-pill i { width: 5px; height: 5px; background: var(--teal); border-radius: 50%; }
.research-pill small { font-size: 10px; margin-left: 4px; }
.language-button { background: none; border: 0; border-left: 1px solid var(--line); padding: 0 0 0 19px; color: #405666; font-size: 12px; font-weight: 500; }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin: 29px 0 16px; }
.hero > div { min-width: 0; }
.eyebrow { color: #28897c; font-size: 12px; font-weight: 600; letter-spacing: .5px; margin: 0 0 8px; }
.hero h1 { font-family: "Noto Serif SC", "SimSun", Georgia, serif; font-weight: 700; font-size: 29px; line-height: 1.45; letter-spacing: .6px; margin: 0 0 8px; }
.hero-copy { color: var(--body); font-size: 13px; margin: 0; }
.privacy-note { border-left: 1px solid var(--line); padding-left: 23px; margin-top: 20px; display: flex; align-items: center; gap: 12px; flex-shrink: 0; font-size: 12px; }
.privacy-note .icon { width: 21px; height: 23px; color: var(--teal); }
.privacy-note strong { font-weight: 600; }
.privacy-note p { margin: 3px 0 0; color: var(--body); font-size: 11px; }
.scope-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 46px; padding: 11px 18px; margin-bottom: 20px; background: #eaf3ef; border: 1px solid #dfebe6; border-radius: 10px; font-size: 12px; }
.scope-banner .icon { color: #27786f; width: 14px; height: 14px; }
.scope-banner strong { font-weight: 600; color: #225f5a; }
.scope-range { padding-left: 16px; border-left: 1px solid #d1e0dc; }
.scope-reminder { margin-left: auto; color: #435862; }
.workspace { display: grid; grid-template-columns: 1.12fr 1fr; gap: 22px; align-items: stretch; }
.left-column, .right-column { min-width: 0; display: flex; }
.card { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: white; padding: 23px; box-shadow: 0 1px 2px #173b4a02; }
.input-card, .result-card { display: flex; flex-direction: column; min-height: 906px; }
.section-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
h2 { display: flex; align-items: center; gap: 11px; font-size: 20px; line-height: 1.5; margin: 0; font-weight: 650; }
.step-number { display: grid; place-items: center; width: 26px; height: 27px; flex-shrink: 0; color: var(--teal); background: #eaf5ef; border-radius: 7px; font: 600 12px/1 "Segoe UI", sans-serif; }
.required-hint { color: var(--body); font-size: 11px; white-space: nowrap; }
.required { color: #d45b49; margin-left: 3px; }
.subtle, .field-note { color: var(--body); font-size: 12px; line-height: 1.85; }
.section-description { margin: 0 0 18px; }
.report-upload { border: 1px solid #e3eceb; background: #f5f8f7; border-radius: 9px; margin-bottom: 20px; }
summary { cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
.report-upload > summary { min-height: 60px; display: flex; align-items: center; gap: 11px; padding: 10px 13px; border-radius: 8px; }
.report-upload > summary:hover { background: #edf5f1; }
.report-icon { display: grid; place-items: center; width: 31px; height: 33px; flex: 0 0 auto; color: var(--teal); border-radius: 8px; background: #e5f1e9; }
.report-copy { min-width: 0; flex: 1; }
.report-copy strong { display: block; font-size: 12px; font-weight: 650; }
.report-copy small { display: block; font-size: 12px; color: var(--body); margin-top: 1px; }
.optional-tag { background: white; border: 1px solid var(--line); border-radius: 4px; color: var(--body); font-size: 11px; line-height: 1.6; padding: 0 5px; }
summary > .icon-chevron { width: 13px; height: 13px; color: #65818a; transition: transform .15s; }
details[open] > summary > .icon-chevron { transform: rotate(90deg); }
.upload-content { padding: 0 14px 16px; border-top: 1px solid var(--line); }
.upload-heading { display: flex; justify-content: flex-end; margin: 13px 0 7px; }
.upload-content > .subtle { margin: 0 0 12px; }
#patient-form { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.field-section { margin: 0; }
.group-title { position: relative; font-size: 14px; font-weight: 600; line-height: 1.6; margin: 0 0 13px; padding-left: 10px; }
.group-title::before { content: ""; position: absolute; left: 0; top: 5px; width: 3px; height: 13px; border-radius: 1px; background: #80b49e; }
.field-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; }
.field { display: block; min-width: 0; font-size: 13px; }
.field-label, .field > span:not(.input-wrap) { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px; min-height: 22px; margin-bottom: 5px; }
.field b { font-weight: 500; }
.field-context { margin-left: auto; color: var(--body); font-size: 11px; font-weight: 400; }
.input-wrap { position: relative; display: block; }
input[type=number], input[type=password], select { display: block; width: 100%; min-width: 0; height: 41px; padding: 9px 12px; border: 1px solid #dbe5e9; border-radius: 7px; background: #fff; color: var(--ink); font-size: 13px; transition: border-color .15s, box-shadow .15s; }
input[type=number] { appearance: textfield; -moz-appearance: textfield; padding-right: 53px; }
input::-webkit-inner-spin-button, input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.input-unit { pointer-events: none; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--body); }
input::placeholder { color: #667887; opacity: 1; }
input:focus, select:focus { outline: none; border-color: #379a8a; box-shadow: 0 0 0 3px #138b7812; }
select { padding-right: 30px; cursor: pointer; color: var(--body); }
select:has(option:checked:not([value=""])) { color: var(--ink); }
.field.full { grid-column: 1 / -1; }
.field-note { margin: 8px 0 0; font-size: 11px; }
.mri-section { border-top: 1px solid #edf1f2; padding-top: 18px; margin-top: 19px; }
.missing-details { margin-top: 4px; }
.missing-details > summary { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; color: var(--teal); font-size: 11px; font-weight: 500; }
.missing-details > summary .icon { width: 11px; height: 11px; transform: rotate(90deg); color: var(--teal); }
.missing-details[open] > summary .icon { transform: rotate(-90deg); }
.missing-details > .field-note { margin-top: 2px; }
.consent-block { border-top: 1px solid #edf1f2; margin-top: 13px; padding-top: 7px; }
.check-row { display: flex; align-items: flex-start; gap: 9px; font-size: 11px; color: var(--body); margin: 10px 0; cursor: pointer; }
.check-row input { flex: 0 0 auto; accent-color: var(--teal); width: 14px; height: 14px; margin: 2px 0 0; }
.form-actions { display: flex; gap: 10px; margin-top: auto; padding-top: 26px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 42px; padding: 9px 18px; border-radius: 7px; border: 1px solid transparent; font-size: 13px; font-weight: 400; transition: background .15s, border-color .15s; }
.button.primary { position: relative; flex: 1; background: linear-gradient(105deg, #11786d, #087267); color: white; border-color: #087367; }
.button.primary:hover:not(:disabled) { background: var(--teal-dark); }
.button.primary:disabled { opacity: .65; }
.button-arrow { position: absolute; right: 18px; font-size: 19px; font-family: Arial, sans-serif; }
.button.secondary { background: white; border-color: var(--line); color: var(--body); }
.button.secondary:hover:not(:disabled) { background: #edf5f2; border-color: #bcd6ce; }
.button.secondary:disabled { background: #f5f8f8; color: #7f8d94; }
.badge { border-radius: 20px; padding: 3px 9px; font-size: 11px; line-height: 1.65; white-space: nowrap; color: var(--teal); background: #eaf5ef; }
.badge.muted { background: #eff4f4; color: #637782; }
#result-status::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: currentColor; }
.badge.warn { color: #8c642e; background: #fff4e6; }
.primary-result { padding: 13px 20px 9px; border: 1px solid #d9eae3; border-radius: 9px; background: linear-gradient(120deg, #edf7f2, #f0f8f5); }
.outcome-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--teal); font-size: 12px; font-weight: 650; }
.outcome-meta small { background: #e3f1e8; border: 1px solid #d2e5d8; border-radius: 5px; padding: 1px 7px; font-size: 10px; font-weight: 400; }
.outcome-title { display: block; font-size: 17px; line-height: 1.6; margin-top: 2px; }
.risk-number { font: 400 56px/1 "Segoe UI", Arial, sans-serif; color: var(--teal); letter-spacing: -2px; margin: 14px 0 8px; min-height: 44px; }
.risk-number span { font-size: 25px; margin-left: 4px; letter-spacing: 0; }
.primary-result p { font-size: 11px; line-height: 1.8; margin: 0 0 10px; color: #547a6b; }
progress { display: block; width: 100%; height: 5px; border: 0; border-radius: 4px; background: #d7e7df; appearance: none; }
progress::-webkit-progress-bar { background: #d7e7df; border-radius: 4px; }
progress::-webkit-progress-value { background: #1f8a76; border-radius: 4px; transition: width .2s; }
progress::-moz-progress-bar { background: #1f8a76; border-radius: 4px; }
.scale { display: flex; justify-content: space-between; font: 10px/1.6 "Segoe UI", sans-serif; color: #5c746a; margin-top: 3px; }
.secondary-result { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 81px; padding: 11px 16px; margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; }
.secondary-result small { display: block; color: var(--body); font-size: 11px; margin-bottom: 1px; }
.secondary-result small span { margin-left: 5px; }
.secondary-result strong { display: block; font-size: 14px; font-weight: 600; }
.secondary-number { white-space: nowrap; font: 400 32px/1.3 "Segoe UI", Arial, sans-serif; color: #254552; }
.secondary-number span { margin-left: 4px; font-size: 20px; }
.result-caption { margin: 9px 0 0; font-size: 11px; color: var(--body); line-height: 1.85; }
.derived-section { border-top: 1px solid #edf1f2; padding-top: 14px; margin-top: 17px; }
.derived-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.derived-heading h3 { font-size: 13px; margin: 0; }
.derived-heading > small { color: var(--body); font-size: 11px; }
.derived-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 8px; }
.derived-grid > div { min-width: 0; background: #f4f7f6; border-radius: 8px; min-height: 65px; padding: 10px 13px; }
.derived-grid small { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 3px; color: var(--body); font-size: 11px; }
.derived-grid em { font-style: normal; font-size: 9px; }
.derived-grid strong { display: block; margin-top: 1px; color: #385965; font: 400 20px/1.4 "Segoe UI", sans-serif; }
.interpret-box { padding: 12px; margin-top: 20px; border: 1px solid #f0e9de; border-radius: 9px; background: #faf8f3; color: #705533; }
.interpret-box h3 { display: flex; align-items: center; gap: 6px; font-size: 12px; margin: 0 0 5px; }
.interpret-box .icon { width: 16px; height: 16px; }
.interpret-copy { font-size: 11px; line-height: 1.9; margin: 0; }
.model-details { margin-top: 16px; }
.model-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--teal); min-height: 31px; font-size: 11px; font-weight: 500; }
.model-details > summary .icon { color: var(--teal); }
.model-details p { color: var(--body); font-size: 11px; line-height: 1.9; margin: 6px 0; }
.model-summary { margin: 3px 0 0; font-size: 11px; line-height: 1.9; color: var(--body); }
.text-button { color: var(--teal); background: none; border: 0; padding: 4px 0; font-size: 11px; }
.text-button:hover { text-decoration: underline; }
.tiny { font-size: 10px; color: var(--muted); margin: 10px 0; overflow-wrap: anywhere; }
.tiny:empty { display: none; }
.result-actions { display: flex; gap: 9px; padding-top: 15px; border-top: 1px solid #edf1f2; margin-top: auto; }
.result-actions .button { min-height: 39px; font-size: 12px; padding: 8px 14px; }
#download { flex: 1; }
.result-actions .icon { width: 15px; height: 15px; }
.below-card { display: flex; align-items: center; justify-content: center; gap: 8px; color: #647579; font-size: 11px; margin: 18px 0 22px; text-align: center; }
.below-card .icon { width: 13px; height: 13px; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0 19px; border-top: 1px solid var(--line); color: #647379; font-size: 10px; }
footer > div { display: flex; align-items: center; gap: 13px; }
footer .text-button { font-size: 10px; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; text-align: center; padding: 21px 12px; border: 1px dashed #a7c9bf; border-radius: 8px; background: #fff; cursor: pointer; }
.dropzone.dragover, .dropzone:hover { background: #eef7f2; border-color: var(--teal); }
.dropzone:focus-within { outline: 2px solid var(--teal); outline-offset: 3px; }
.dropzone input { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.dropzone strong { font-size: 12px; font-weight: 500; }
.dropzone > span:last-child { font-size: 10px; color: var(--body); }
.upload-symbol { font-size: 24px; color: var(--teal); line-height: 1.2; }
.upload-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.upload-actions .button { font-size: 11px; min-height: 36px; padding: 7px 13px; }
.upload-actions .subtle { margin: 0; }
.image-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin-top: 13px; }
.image-list:empty { display: none; }
.image-card { min-width: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.image-card img { display: block; width: 100%; height: 100px; object-fit: contain; }
.image-card small { display: block; font-size: 9px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 4px 6px; }
.image-card-actions { display: flex; justify-content: space-around; border-top: 1px solid var(--line); }
.image-card-actions button { background: none; border: 0; font-size: 10px; color: var(--teal); padding: 7px 4px; }
.review-panel { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.review-panel > summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; }
.review-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.review-item-title { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.evidence { font-size: 11px; color: var(--body); padding: 8px 10px; margin: 8px 0; background: white; border-radius: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.evidence small { display: block; color: var(--muted); margin-top: 4px; }
.review-item select { font-size: 11px; }
.notice { font-size: 12px; line-height: 1.8; border: 1px solid #ccded8; border-radius: 8px; padding: 10px 13px; margin: 13px 0; color: var(--teal); background: #f2f8f5; overflow-wrap: anywhere; }
.notice.warning, .check-row.warning { color: #835c32; background: #fff8ee; border-color: #ead9bd; }
.check-row.warning { padding: 9px; border-radius: 6px; }
.notice.error { color: var(--danger); background: #fff5f4; border-color: #ebcfca; }
.notice p { margin: 0 0 8px; }
.imputation-options { background: #f5f8f6; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 10px; }
.imputation-options > p { font-size: 11px; margin: 0 0 8px; }
.imputation-options .field-note { margin-bottom: 0; }
dialog { border: 1px solid var(--line); border-radius: 16px; padding: 30px; max-width: 420px; width: calc(100% - 36px); color: var(--ink); }
dialog::backdrop { background: #133e4b45; backdrop-filter: blur(4px); }
dialog p { font-size: 12px; color: var(--body); }
dialog h2 { margin-top: 17px; }
dialog .button { width: 100%; margin-top: 17px; }
.error-text { color: var(--danger); }
html[lang=en] .hero h1 { font-family: Georgia, serif; font-size: 31px; letter-spacing: -.7px; }
html[lang=en] .hero-copy { font-size: 12px; }
html[lang=en] .hero > div { max-width: 700px; }
html[lang=en] h2 { font-size: 18px; }
html[lang=en] .outcome-title { font-size: 16px; }
html[lang=en] .input-card, html[lang=en] .result-card { min-height: 960px; }
@media (max-width: 1000px) {
  .workspace { gap: 18px; grid-template-columns: 1.08fr 1fr; }
  .card { padding: 20px; }
  .hero { gap: 18px; }
  .hero h1 { font-size: 27px; }
  .hero-copy { font-size: 12px; }
  .privacy-note { padding-left: 16px; gap: 9px; }
  .scope-banner { gap: 9px; }
  .scope-reminder { font-size: 11px; }
  .outcome-title { font-size: 16px; }
  .input-card, .result-card { min-height: 920px; }
  .field-context { font-size: 10px; }
  .report-copy strong, .report-copy small { font-size: 11px; }
  .report-upload > summary { padding: 10px; gap: 8px; }
  .derived-heading > small { font-size: 10px; }
}
@media (max-width: 800px) {
  .header-inner, .container { padding-left: 18px; padding-right: 18px; }
  .header-inner { min-height: 70px; }
  .brand strong { font-size: 15px; }
  .hero { margin: 24px 0 20px; }
  .privacy-note { display: none; }
  .scope-reminder { flex-basis: 100%; margin-left: 26px; }
  .scope-banner { row-gap: 4px; }
  .workspace { grid-template-columns: 1fr; gap: 18px; }
  .input-card, .result-card, html[lang=en] .input-card, html[lang=en] .result-card { min-height: 0; }
  .card { padding: 23px; }
  .result-actions { margin-top: 26px; }
  .form-actions { padding-top: 22px; }
  .report-copy strong, .report-copy small { font-size: 12px; }
  .hero-copy { max-width: 640px; }
  .result-card { scroll-margin-top: 15px; }
  footer { align-items: flex-start; }
  footer > div { justify-content: flex-end; flex-wrap: wrap; row-gap: 3px; }
}
@media (max-width: 480px) {
  .header-inner, .container { padding-left: 16px; padding-right: 16px; }
  .header-inner { gap: 10px; }
  .brand { gap: 8px; }
  .brand-mark { width: 34px; height: 34px; font-size: 29px; }
  .brand strong { font-size: 13px; }
  .brand small { font-size: 8px; letter-spacing: 1.4px; }
  .research-pill { display: none; }
  .language-button { border: 0; padding: 10px 0 10px 5px; font-size: 11px; white-space: nowrap; }
  .hero { margin-top: 24px; }
  .eyebrow { font-size: 11px; }
  .hero h1 { font-size: 25px; letter-spacing: 0; }
  .hero-copy { font-size: 12px; line-height: 1.9; }
  .scope-banner { padding: 10px 12px; font-size: 11px; gap: 6px 8px; }
  .scope-range { border: 0; padding-left: 23px; flex-basis: 100%; }
  .scope-reminder { margin-left: 23px; }
  .card { padding: 20px 17px; border-radius: 13px; }
  h2 { font-size: 19px; }
  .section-description { font-size: 11px; margin-bottom: 16px; }
  .report-upload > summary { padding: 10px; gap: 8px; }
  .report-copy strong { font-size: 12px; }
  .report-copy small { font-size: 10px; }
  .optional-tag { font-size: 10px; padding: 0 3px; }
  .report-icon { width: 27px; height: 30px; }
  .field-grid { gap: 14px 10px; }
  .field { font-size: 12px; }
  .field-context { font-size: 10px; }
  input[type=number], input[type=password], select { height: 44px; font-size: 12px; padding-left: 10px; }
  input[type=number] { padding-right: 43px; }
  .input-unit { right: 10px; font-size: 10px; }
  #adc { font-size: 12px; }
  .group-title { font-size: 13px; }
  .check-row { line-height: 1.8; }
  .button { min-height: 44px; }
  .primary-result { padding: 14px 17px 10px; }
  .outcome-title { font-size: 17px; }
  .model-summary { font-size: 10px; }
  .below-card { align-items: flex-start; line-height: 1.9; font-size: 10px; }
  .below-card .icon { margin-top: 3px; }
  footer { display: block; padding-bottom: 20px; }
  footer > div { justify-content: space-between; gap: 8px; margin-top: 5px; }
  .footer-separator { display: none; }
  html[lang=en] .hero h1 { font-size: 28px; }
  html[lang=en] .field-label { min-height: 37px; align-content: flex-start; }
  html[lang=en] .field-context { margin-left: 0; }
  html[lang=en] .field.full .field-label { min-height: 22px; }
  html[lang=en] .report-copy strong { font-size: 11px; }
  html[lang=en] .report-copy small { font-size: 10px; }
  html[lang=en] .optional-tag { display: none; }
}
@media (max-width: 359px) {
  .header-inner, .container { padding-left: 12px; padding-right: 12px; }
  .card { padding: 18px 14px; }
  .field-grid { grid-template-columns: 1fr; }
  .field-context { margin-left: auto; }
  .hero h1 { font-size: 22px; }
  .report-copy strong { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, html { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  body { background: white; font-size: 11px; }
  .header-inner, .container { max-width: none; padding: 0; }
  .header-tools, .hero, .scope-banner, .report-upload, .form-actions, .result-actions, footer, .consent-block, .research-share, .missing-details, .text-button, .below-card, .skip-link, #notice, #form-error, #example-note, dialog { display: none !important; }
  .header { padding-bottom: 10px; }
  .workspace { display: block; }
  .input-card, .result-card, html[lang=en] .input-card, html[lang=en] .result-card { min-height: 0; break-inside: avoid; margin: 12px 0; padding: 18px; border: 1px solid #ccc; box-shadow: none; }
  .primary-result, .interpret-box { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .field-grid { grid-template-columns: 1fr 1fr; }
  .check-row { display: none; }
  .model-details { display: none; }
  .model-summary, #result-time { display: block; }
}


/* RDW-SD explanatory help; scoped to this field. */
@media screen {
  .rdw-field > .field-label { flex-wrap: nowrap; }
  .rdw-field .field-help { display: inline-flex; align-self: center; flex: 0 0 auto; margin-left: 2px; }
  .rdw-field .field-help-button { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; padding: 4px; border: 0; border-radius: 50%; background: transparent; color: #5e817d; cursor: pointer; }
  .rdw-field .field-help-button svg { display: block; width: 15px; height: 15px; }
  .rdw-field .field-help-button:hover, .rdw-field .field-help-button[aria-expanded=true] { background: #eaf3f0; color: #166b69; }
  .rdw-field .field-help-button:focus-visible { outline: 2px solid #166b69; outline-offset: 2px; }
  .field.rdw-field .field-help-tooltip { position: fixed; z-index: 30; display: block; box-sizing: border-box; width: max-content; max-width: min(280px, calc(100vw - 32px)); margin: 0; padding: 7px 8px; border: 1px solid #d7e6e1; border-radius: 8px; background: #fff; box-shadow: 0 3px 12px rgb(20 57 70 / 9%); color: #3f565f; font-size: 13px; font-weight: 400; line-height: 1.65; white-space: normal; overflow-wrap: break-word; text-align: left; }
  .field.rdw-field .field-help-tooltip[hidden] { display: none; }
  .field.field.rdw-field .field-help-tooltip { min-height: 0; }
  .field.rdw-field .field-help-tooltip[data-placement=right]::before {
    content: ""; position: absolute; left: -5px; top: calc(var(--arrow-top) - 4px);
    width: 8px; height: 8px; background: #fff;
    border-left: 1px solid #d7e6e1; border-bottom: 1px solid #d7e6e1; transform: rotate(45deg);
  }
  .field.rdw-field .field-help-tooltip[data-placement=inline] {
    position: static; width: 100%; max-width: none; margin: 8px 0 0;
    box-shadow: none; background: #f7faf9;
  }

  @media (pointer: coarse) {
    .rdw-field .field-help-button::before { content: ""; position: absolute; width: 36px; height: 36px; }
  }
}
@media print {
  .rdw-field .field-help, .field.rdw-field .field-help-tooltip { display: none !important; }
}
