osteoml / web /styles.css
new-ames's picture
Deploy OsteoML Docker Space
7e0c9d1 verified
Raw History Blame Contribute Delete
13.3 kB
:root {
--ink: #111318;
--muted: #6d717b;
--soft: #9aa0ad;
--line: #e8eaf0;
--paper: #f7f8fb;
--blue: #243cc9;
--blue-soft: #eef2ff;
--teal: #0d9488;
--amber: #c77700;
--red: #c4362e;
--radius: 8px;
--max: 1360px;
--page-gutter: clamp(48px, 5vw, 88px);
}
* {
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
body {
margin: 0;
color: var(--ink);
background: #fff;
font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
"PingFang SC", "Microsoft YaHei", Arial, sans-serif;
line-height: 1.45;
}
.mobile-blocker {
display: none;
}
a {
color: inherit;
text-decoration: none;
}
.site-header {
width: min(var(--max), calc(100% - (var(--page-gutter) * 2)));
margin: 0 auto;
padding: 30px 0;
display: flex;
align-items: center;
justify-content: space-between;
gap: 32px;
}
.brand {
display: inline-flex;
align-items: center;
gap: 8px;
font-size: 16px;
font-weight: 800;
color: var(--blue);
letter-spacing: 0;
}
.brand-mark {
width: 18px;
height: 18px;
display: inline-block;
border: 2px solid var(--blue);
border-left-width: 6px;
background:
linear-gradient(var(--blue), var(--blue)) 4px 4px / 8px 2px no-repeat,
linear-gradient(var(--blue), var(--blue)) 4px 9px / 8px 2px no-repeat;
}
nav {
display: flex;
align-items: center;
justify-content: space-evenly;
gap: 42px;
flex: 1;
color: #252934;
font-size: 16px;
font-weight: 750;
}
nav a:hover,
.login-link:hover {
color: var(--blue);
}
.login-link {
padding: 9px 16px;
border: 1px solid var(--line);
border-radius: 8px;
font-size: 15px;
font-weight: 700;
background: #fff;
box-shadow: 0 8px 24px rgba(18, 25, 38, 0.07);
}
.site-header > .login-link {
margin-left: auto;
}
.status-pill {
padding: 9px 14px;
border: 1px solid var(--line);
border-radius: 999px;
color: var(--muted);
background: #fff;
font-size: 12px;
font-weight: 850;
}
.status-pill.online {
color: #087568;
border-color: rgba(13, 148, 136, 0.28);
background: rgba(13, 148, 136, 0.08);
}
.status-pill.fallback {
color: #9a6200;
border-color: rgba(199, 119, 0, 0.28);
background: rgba(199, 119, 0, 0.08);
}
.hero {
width: min(var(--max), calc(100% - (var(--page-gutter) * 2)));
margin: 18px auto 0;
padding: 18px 0 22px;
background-image:
linear-gradient(rgba(36, 60, 201, 0.08) 1px, transparent 1px),
linear-gradient(90deg, rgba(36, 60, 201, 0.08) 1px, transparent 1px);
background-size: 16px 16px;
background-position: -1px -1px;
}
.hero-copy {
max-width: 690px;
}
.eyebrow {
margin: 0 0 14px;
color: var(--blue);
font-size: 11px;
font-weight: 900;
letter-spacing: 0.14em;
text-transform: uppercase;
}
h1,
h2,
h3,
p {
letter-spacing: 0;
}
h1 {
max-width: 650px;
margin: 0;
font-size: clamp(42px, 5.1vw, 64px);
line-height: 0.94;
font-weight: 900;
}
.title-en,
.title-cn {
display: block;
}
.lead {
max-width: 610px;
margin: 16px 0 0;
color: #767982;
font-size: clamp(19px, 2.1vw, 24px);
line-height: 1.05;
font-weight: 650;
}
.metrics {
margin-top: 26px;
border-top: 1px solid var(--line);
border-bottom: 1px solid var(--line);
display: grid;
grid-template-columns: repeat(4, 1fr);
}
.metrics div {
padding: 16px 26px 14px 0;
}
.metrics strong {
display: block;
font-size: clamp(30px, 4vw, 42px);
line-height: 1;
font-weight: 850;
}
.metrics span {
display: block;
margin-top: 8px;
color: var(--muted);
font-size: 12px;
}
.hero-note {
max-width: 520px;
margin: 16px 0 0;
color: #343844;
font-size: 15px;
}
.image-strip {
width: min(var(--max), calc(100% - (var(--page-gutter) * 2)));
margin-left: auto;
margin-right: auto;
margin-top: 18px;
display: grid;
grid-template-columns: 0.72fr 1.65fr 1.25fr;
gap: 14px;
overflow: hidden;
}
.image-strip img {
width: 100%;
height: 260px;
object-fit: cover;
filter: saturate(0.9) contrast(1.02);
}
.content-grid,
.calculator-section,
.methods-note {
width: min(var(--max), calc(100% - (var(--page-gutter) * 2)));
margin: 104px auto 0;
}
.content-grid {
display: grid;
grid-template-columns: 1.1fr 1fr 1fr;
gap: 56px 42px;
}
.section-title {
grid-row: span 2;
}
h2 {
margin: 0;
font-size: clamp(34px, 4vw, 52px);
line-height: 1.02;
font-weight: 850;
}
h3 {
margin: 0 0 14px;
font-size: 24px;
line-height: 1.1;
}
article p,
.calculator-intro p,
.methods-note p,
.panel-note {
margin: 0;
color: #333845;
font-size: 15px;
}
.shap-card {
margin-top: 24px;
padding: 26px;
border: 1px solid var(--line);
border-radius: var(--radius);
background: #fff;
box-shadow: 0 18px 50px rgba(18, 25, 38, 0.06);
}
.shap-card h3 {
margin-bottom: 10px;
}
.shap-card p:not(.eyebrow) {
margin: 0;
color: var(--muted);
font-size: 14px;
}
.shap-plot {
margin-top: 24px;
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 18px;
}
.native-shap-figure {
margin: 0;
padding: 14px;
border: 1px solid var(--line);
border-radius: var(--radius);
background: #fff;
}
.native-shap-figure img {
width: 100%;
display: block;
border-radius: 6px;
}
.native-shap-figure figcaption {
margin-top: 10px;
color: var(--muted);
font-size: 12px;
font-weight: 800;
}
.calculator-section {
padding: 72px 0;
border-top: 1px solid var(--line);
border-bottom: 1px solid var(--line);
}
.calculator-page-hero {
width: min(var(--max), calc(100% - (var(--page-gutter) * 2)));
margin: 36px auto 0;
padding: 48px 0 24px;
}
.calculator-page-hero h1 {
max-width: 820px;
}
.calculator-section.standalone {
margin-top: 28px;
border-top: 0;
}
.calculator-intro {
max-width: 760px;
margin-bottom: 34px;
}
.calculator-intro p {
margin-top: 18px;
max-width: 640px;
}
.calculator-shell {
display: grid;
grid-template-columns: 1.2fr 0.8fr;
gap: 24px;
align-items: start;
}
.risk-form,
.result-panel {
border: 1px solid var(--line);
border-radius: var(--radius);
background: #fff;
box-shadow: 0 18px 50px rgba(18, 25, 38, 0.08);
}
.risk-form {
padding: 24px;
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 16px;
}
label {
color: #2b303b;
font-size: 12px;
font-weight: 800;
}
input,
select {
width: 100%;
margin-top: 7px;
padding: 12px 12px;
border: 1px solid #d9dde7;
border-radius: 8px;
color: var(--ink);
background: #fff;
font: inherit;
font-size: 15px;
}
input:focus,
select:focus {
outline: 2px solid rgba(36, 60, 201, 0.18);
border-color: var(--blue);
}
button,
.form-submit-link {
align-self: end;
min-height: 46px;
border: 0;
border-radius: 8px;
color: #fff;
background: var(--ink);
font: inherit;
font-weight: 850;
cursor: pointer;
}
button:hover,
.form-submit-link:hover {
background: var(--blue);
}
.form-submit-link {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 0 16px;
text-align: center;
}
.result-panel {
padding: 26px;
position: sticky;
top: 20px;
}
.result-topline h3 {
margin-bottom: 10px;
font-size: 30px;
}
.result-topline p:not(.eyebrow) {
margin: 0;
color: var(--muted);
}
.derived {
margin: 26px 0;
display: grid;
grid-template-columns: 1fr 1fr;
border: 1px solid var(--line);
border-radius: 8px;
}
.derived div {
padding: 16px;
}
.derived div + div {
border-left: 1px solid var(--line);
}
.derived span {
display: block;
color: var(--muted);
font-size: 12px;
font-weight: 800;
}
.derived strong {
display: block;
margin-top: 4px;
font-size: 28px;
}
.probabilities {
display: grid;
gap: 16px;
}
.prob-row {
display: grid;
grid-template-columns: 102px 1fr 48px;
gap: 12px;
align-items: center;
font-size: 13px;
font-weight: 850;
}
.prob-row div {
height: 10px;
border-radius: 999px;
background: #eceff5;
overflow: hidden;
}
.prob-row i {
display: block;
height: 100%;
width: 0;
border-radius: inherit;
transition: width 220ms ease;
}
.normal i {
background: var(--teal);
}
.osteopenia i {
background: var(--amber);
}
.osteoporosis i {
background: var(--red);
}
.panel-note {
margin-top: 24px;
padding-top: 20px;
border-top: 1px solid var(--line);
color: var(--muted);
font-size: 13px;
}
.table-wrap {
margin-top: 32px;
overflow-x: auto;
border: 1px solid var(--line);
border-radius: var(--radius);
}
table {
width: 100%;
min-width: 760px;
border-collapse: collapse;
background: #fff;
}
th,
td {
padding: 18px 20px;
border-bottom: 1px solid var(--line);
text-align: left;
vertical-align: top;
font-size: 14px;
}
th {
color: var(--muted);
background: var(--paper);
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.08em;
}
tr:last-child td {
border-bottom: 0;
}
.methods-note {
padding: 64px 0;
display: grid;
grid-template-columns: 1fr 0.86fr;
gap: 64px;
border-top: 1px solid var(--line);
}
.site-footer {
width: min(var(--max), calc(100% - (var(--page-gutter) * 2)));
margin: 40px auto;
padding-top: 24px;
border-top: 1px solid var(--line);
display: flex;
justify-content: space-between;
gap: 18px;
color: var(--muted);
font-size: 12px;
}
.brand.small {
color: #333845;
}
@media (max-width: 760px) {
body {
min-height: 100vh;
background:
linear-gradient(rgba(36, 60, 201, 0.08) 1px, transparent 1px),
linear-gradient(90deg, rgba(36, 60, 201, 0.08) 1px, transparent 1px),
#fff;
background-size: 16px 16px;
}
body > .site-header,
body > main,
body > .site-footer {
display: none;
}
.mobile-blocker {
min-height: 100vh;
width: min(100% - 40px, 520px);
margin: 0 auto;
display: flex;
flex-direction: column;
justify-content: center;
gap: 18px;
}
.mobile-blocker h1 {
max-width: 420px;
font-size: 42px;
line-height: 1;
}
.mobile-blocker p {
max-width: 420px;
margin: 0;
color: var(--muted);
font-size: 18px;
line-height: 1.35;
font-weight: 650;
}
.mobile-blocker-brand {
margin-bottom: 8px;
}
}
@media (min-width: 761px) and (max-width: 900px) {
.site-header,
.site-footer {
flex-wrap: wrap;
}
nav {
order: 3;
width: 100%;
justify-content: space-between;
gap: 12px;
overflow-x: auto;
}
.status-pill {
margin-left: auto;
}
.metrics,
.content-grid,
.calculator-shell,
.methods-note {
grid-template-columns: 1fr;
}
.shap-plot {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.section-title {
grid-row: auto;
}
.risk-form {
grid-template-columns: repeat(2, 1fr);
}
.result-panel {
position: static;
}
}
@media (min-width: 761px) and (max-width: 900px) {
.site-header,
.hero,
.calculator-page-hero,
.content-grid,
.calculator-section,
.methods-note,
.site-footer {
width: min(100% - 28px, var(--max));
}
.login-link {
display: none;
}
.calculator-page .site-header {
align-items: flex-start;
gap: 16px;
padding: 28px 0 18px;
}
.calculator-page nav {
order: 2;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
width: 100%;
gap: 10px 14px;
overflow: visible;
font-size: 13px;
line-height: 1.25;
}
.calculator-page nav a {
min-width: 0;
word-break: keep-all;
}
.calculator-page .status-pill {
order: 1;
margin-left: 0;
max-width: 190px;
white-space: normal;
text-align: center;
line-height: 1.2;
}
h1 {
font-size: 48px;
}
.calculator-page-hero {
margin-top: 34px;
padding: 38px 0 22px;
}
.calculator-page-hero h1 {
font-size: 42px;
line-height: 0.98;
max-width: 100%;
}
.calculator-page-hero .title-en {
max-width: 340px;
}
.calculator-page-hero .title-cn {
margin-top: 6px;
max-width: 310px;
font-size: 39px;
line-height: 0.96;
}
.lead {
font-size: 22px;
}
.calculator-page .lead {
font-size: 20px;
line-height: 1.08;
}
.calculator-intro h2 {
font-size: 32px;
line-height: 1.05;
}
.metrics {
grid-template-columns: 1fr 1fr;
}
.image-strip {
grid-template-columns: 1fr;
}
.image-strip img {
height: 230px;
}
.risk-form {
grid-template-columns: 1fr;
padding: 18px;
}
.prob-row {
grid-template-columns: 86px 1fr 40px;
gap: 10px;
font-size: 12px;
}
.result-panel,
.shap-card {
padding: 18px;
}
.result-topline h3 {
font-size: 24px;
}
.derived {
grid-template-columns: 1fr;
}
.derived div + div {
border-left: 0;
border-top: 1px solid var(--line);
}
input,
select,
button,
.form-submit-link {
min-height: 46px;
}
.native-shap-figure {
padding: 8px;
}
.shap-plot {
grid-template-columns: 1fr;
}
.native-shap-figure figcaption {
font-size: 11px;
}
}
@media (min-width: 761px) and (max-width: 820px) {
.calculator-page-hero h1 {
font-size: 38px;
}
.calculator-page-hero .title-cn {
font-size: 34px;
}
.calculator-page .lead {
font-size: 18px;
}
.calculator-intro h2 {
font-size: 29px;
}
}