Files

207 lines
3.4 KiB
CSS
Raw Permalink Normal View History

/* SatsChart — Cascade bar chart for KS2 SATs results */
.container {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 1.75rem;
padding-top: 0.25rem;
}
/* ── Individual subject column ── */
.subjectChart {
position: relative;
}
.subjectName {
font-size: 0.65rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.1em;
color: var(--text-muted, #6d685f);
margin-bottom: 0.75rem;
}
.chartArea {
position: relative;
padding-bottom: 0.25rem;
}
/* ── Gridlines ── */
.gridlines {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 20px;
pointer-events: none;
}
.gridline {
position: absolute;
top: 0;
height: 100%;
width: 1px;
background: var(--bg-secondary, #f3ede4);
}
/* ── National average marker ── */
.natLine {
position: absolute;
top: 0;
height: calc(100% - 20px);
width: 1.5px;
background: rgba(224, 114, 86, 0.35); /* --accent-coral at 35% */
z-index: 2;
pointer-events: none;
}
.natPill {
position: absolute;
top: -10px;
transform: translateX(-50%);
background: var(--accent-coral, #e07256);
color: #fff;
font-size: 0.55rem;
font-weight: 700;
padding: 0.1rem 0.35rem;
border-radius: 4px;
white-space: nowrap;
z-index: 3;
letter-spacing: 0.02em;
}
/* ── Bar rows ── */
.barGroup {
position: relative;
z-index: 1;
display: flex;
flex-direction: column;
gap: 0.35rem;
padding-top: 0.9rem;
}
.barRow {
display: flex;
flex-direction: column;
gap: 0.18rem;
}
.barHeader {
display: flex;
justify-content: space-between;
align-items: baseline;
gap: 0.5rem;
}
.barTrack {
width: 100%;
height: 14px;
position: relative;
}
.bar {
height: 100%;
border-radius: 4px;
position: relative;
transition: width 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.barExpected {
background: var(--accent-teal-light, #3a9e9e);
}
.barExceeding {
background: var(--accent-teal, #2d7d7d);
}
.barLabel {
font-family: var(--font-playfair), 'Playfair Display', Georgia, serif;
font-size: 0.78rem;
font-weight: 700;
color: var(--text-primary, #1a1612);
white-space: nowrap;
position: relative;
z-index: 3;
}
.barLabelSuffix {
font-weight: 500;
color: var(--text-muted, #6d685f);
font-size: 0.6rem;
text-transform: uppercase;
letter-spacing: 0.06em;
}
/* ── Ruler ── */
.ruler {
position: relative;
height: 14px;
margin-top: 0.3rem;
border-top: 1px solid var(--border-color, #e5dfd5);
}
.rulerTick {
position: absolute;
top: 0;
width: 1px;
height: 3px;
background: var(--border-color, #e5dfd5);
}
.rulerLabel {
position: absolute;
top: 5px;
font-size: 0.5rem;
font-weight: 500;
color: var(--text-muted, #6d685f);
transform: translateX(-50%);
letter-spacing: 0.01em;
opacity: 0.7;
}
/* Anchor first/last labels to edges */
.rulerLabelFirst {
transform: translateX(0);
}
.rulerLabelLast {
transform: translateX(-100%);
}
/* ── Legend ── */
.legend {
margin-top: 1rem;
display: flex;
gap: 1.25rem;
justify-content: center;
}
.legendItem {
display: flex;
align-items: center;
gap: 0.35rem;
font-size: 0.65rem;
font-weight: 500;
color: var(--text-muted, #6d685f);
}
.legendSwatch {
width: 8px;
height: 8px;
border-radius: 3px;
flex-shrink: 0;
}
/* ── Responsive ── */
@media (max-width: 640px) {
.container {
grid-template-columns: 1fr;
gap: 1.5rem;
}
.legend {
flex-wrap: wrap;
gap: 0.75rem;
}
}