CHRIS / static /10-theme.css
3v324v23's picture
Trying out new theme
a65b02c
Raw History Blame Contribute Delete
6.19 kB
:root {
--navy: #222C67; /* Dark Blue: header, primary button */
--blue: #007CBA; /* Blue: links, hover, accents */
--text: #2E2925; /* Black: body text */
--muted: #6D6E71; /* Dark gray: supporting text */
--white: #FFFFFF;
--red: #D60036; /* Errors and warnings */
--gold: #E5B611; /* Accent only */
/* Supporting neutrals; these are not in the supplied palette */
--border: #C7C9CB;
--surface: #F5F6F8;
}
* { box-sizing: border-box; }
body {
margin: 0;
color: var(--text);
font: 16px/1.5 Arial, Helvetica, sans-serif;
}
a { color: var(--blue); }
a:focus-visible,
button:focus-visible,
input:focus-visible {
outline: 3px solid #e7a600;
outline-offset: 2px;
}
.site-container {
width: min(100% - 2rem, 1400px);
margin-inline: auto;
}
.site-header { background: var(--navy); color: white; }
.site-header-inner {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1.5rem;
padding-block: 1rem;
}
.site-brand { color: white; font-size: 1.25rem; font-weight: 700; }
.site-nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.site-nav a { color: white; }
.site-main { min-height: 75vh; padding-block: 2rem 4rem; }
.site-footer {
padding-block: 2rem;
border-top: 1px solid var(--border);
background: var(--surface);
}
.model-page h1 {
margin: 0 0 1.5rem;
font-size: clamp(1.9rem, 3vw, 2.6rem);
line-height: 1.2;
}
.model-grid {
display: grid;
grid-template-columns: minmax(360px, 500px) minmax(0, 1fr);
gap: 1.5rem;
align-items: start;
}
.controls-panel,
.results-panel {
min-width: 0;
padding: 1.5rem;
border: 1px solid var(--border);
background: white;
}
.controls-panel > div + div { margin-top: 1.5rem; }
.panel-title {
margin: 0 0 1rem;
color: var(--navy);
font-size: 1.35rem;
}
.fields-grid,
.conditions-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 1rem 1.25rem;
}
.fields-grid > *,
.conditions-grid > * { min-width: 0; }
.controls-panel input[type="number"] {
min-height: 38px;
padding: 0.4rem 0.6rem;
border: 1px solid #aebbc5;
border-radius: 3px;
color: var(--text);
}
.controls-panel input:disabled {
background: var(--surface);
color: var(--muted);
}
#calculate {
padding: 0.65rem 1.5rem;
border: 1px solid var(--navy);
border-radius: 3px;
background: var(--navy);
color: white;
font: inherit;
font-weight: 700;
cursor: pointer;
}
#calculate:hover { background: var(--blue); }
.results-description {
max-width: 75ch;
margin: 1.25rem 0 0;
color: var(--muted);
}
@media (max-width: 1050px) {
.model-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
.site-header-inner { align-items: flex-start; flex-direction: column; }
.controls-panel, .results-panel { padding: 1rem; }
.fields-grid, .conditions-grid { grid-template-columns: 1fr; }
#mm0_chart { height: 450px !important; }
}}
.section-header {
margin: 0 0 0.75rem;
padding-bottom: 0.35rem;
border-bottom: 2px solid var(--border);
color: var(--navy);
font-size: 20px;
}
.calculate-row {
margin-top: 1.25rem;
text-align: center;
}
/* Compact the left panel */
.controls-panel {
padding: 1rem;
}
.controls-panel > div + div {
margin-top: 0.75rem;
}
.controls-panel .section-header {
margin-bottom: 0.4rem;
padding-bottom: 0.2rem;
}
.controls-panel .fields-grid,
.controls-panel .conditions-grid {
gap: 0.5rem 1rem;
}
.controls-panel input[type="number"] {
min-height: 32px;
padding: 0.25rem 0.5rem;
}
.controls-panel .calculate-row {
margin-top: 0.75rem;
}
.model-grid {
grid-template-columns: minmax(0, 570px) minmax(0, 1fr);
}
/* Stack the panels before the graph becomes too narrow. */
@media (max-width: 1200px) {
.model-grid {
grid-template-columns: 1fr;
}
}
.visually-hidden {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}
.controls-panel > div + div {
margin-top: 0.75rem;
}
.controls-panel .section-header {
margin-bottom: 0.3rem;
padding-bottom: 0.15rem;
}
.controls-panel .fields-grid,
.controls-panel .conditions-grid {
row-gap: 0.35rem;
}
/* Align both headings and reduce space above them */
.controls-panel,
.results-panel {
padding: 0.75rem 1rem 1rem;
}
.controls-panel .section-header,
.results-panel .panel-title {
margin-top: 0;
line-height: 1.3;
}
/* Bring the condition controls closer to Solutes */
.controls-panel > .conditions-grid {
margin-top: 0.6rem;
}
.controls-panel > div:first-child .section-header {
font-size: 1.35rem;
}
#calculate:hover {
background: var(--blue);
}
#solute_calculate_warning {
color: var(--red);
}
a:focus-visible,
button:focus-visible,
input:focus-visible {
outline: 3px solid var(--navy);
outline-offset: 2px;
}
.controls-panel .section-header {
border-bottom-color: var(--blue);
}
.site-main {
min-height: 0;
padding-bottom: 1.5rem;
}
.fda-logo {
display: block;
width: 300px;
max-width: 100%;
height: auto;
}
/* Let the header use the full screen width, despite .site-container. */
.site-container.site-header-inner {
max-width: none;
width: 100%;
margin: 0;
padding: 14px 16px;
box-sizing: border-box;
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
gap: 16px;
}
.site-header-inner .site-brand {
justify-self: start;
}
.fda-logo {
display: block;
width: 260px;
height: auto;
}
.site-tool-title {
justify-self: center;
color: #fff;
font-size: 1.5rem;
font-weight: 600;
text-align: center;
}
.site-header-inner .site-nav {
justify-self: end;
}
@media (max-width: 1100px) {
.site-container.site-header-inner {
grid-template-columns: 1fr auto;
}
.site-tool-title {
grid-column: 1 / -1;
grid-row: 2;
}
}
.polymer-section > h3,
.results-panel > h3 {
font-size: 20px !important;
line-height: 1.3 !important;
margin-top: 0 !important;
margin-bottom: 10px !important;
}
.site-main {
padding: 20px 24px;
box-sizing: border-box;
}