mirror of
https://github.com/bitbaum/substrata.git
synced 2026-12-04 05:07:46 +01:00
Found by fleet's new render sweep (scripts/ci/render-sweep.mjs):
- empty-heading: the country panel opened with a bare caps "EXTRACT"
directly above the next section's heading - a label with nothing under it.
It is now a sentence: "Role in the chains: extraction" (ROLE_WORDS in
lib/geo.ts, beside the dossier that derives the roles).
- split-number: the resource figures table switched layout on the VIEWPORT
width, but it always lives in a ~22rem panel, so at 1440 four columns
squeezed "282,000 (+10%)" into "282,000 (" / "+10%)". It now switches on
its own width (container query): below 36rem each measure is a block -
label and value on a line, then year-before and world standing, each an
unbreakable figure group with tabular numbers.
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
142 lines
3.2 KiB
CSS
142 lines
3.2 KiB
CSS
/*
|
||
* Resource figures in the country panel and on /resources/[slug]
|
||
* (components/portal/resources/*). Tokens only; tables reuse .series-table.
|
||
*/
|
||
.country-resources h3,
|
||
.country-access h3,
|
||
.resource-peers h3 {
|
||
margin-bottom: 0.4rem;
|
||
}
|
||
.resource-context h4,
|
||
.country-access h4 {
|
||
margin: 0.9rem 0 0.3rem;
|
||
font-family: var(--font-mono);
|
||
font-size: 0.68rem;
|
||
font-weight: 400;
|
||
letter-spacing: var(--tracking-caps);
|
||
text-transform: uppercase;
|
||
color: var(--color-fg-tertiary);
|
||
}
|
||
.resource-item {
|
||
border-top: 1px solid var(--color-border-subtle);
|
||
padding: 0.6rem 0;
|
||
}
|
||
.resource-item > summary {
|
||
cursor: pointer;
|
||
list-style: none;
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
gap: 0.25rem 0.6rem;
|
||
align-items: baseline;
|
||
}
|
||
.resource-strong {
|
||
color: var(--color-fg-primary);
|
||
font-weight: 600;
|
||
}
|
||
.resource-unit {
|
||
font-size: 0.75rem;
|
||
color: var(--color-fg-tertiary);
|
||
}
|
||
.resource-figures th[scope='row'] .resource-unit {
|
||
display: block;
|
||
font-weight: 400;
|
||
}
|
||
.resource-line {
|
||
margin-top: 0.5rem;
|
||
font-size: 0.8rem;
|
||
line-height: 1.5;
|
||
color: var(--color-fg-secondary);
|
||
max-width: 70ch;
|
||
}
|
||
.resource-empty {
|
||
font-size: 0.8rem;
|
||
color: var(--color-fg-tertiary);
|
||
}
|
||
.resource-source {
|
||
margin-top: 0.5rem;
|
||
font-size: 0.72rem;
|
||
line-height: 1.5;
|
||
color: var(--color-fg-muted);
|
||
max-width: 70ch;
|
||
}
|
||
.resource-list {
|
||
display: grid;
|
||
gap: 0.35rem;
|
||
font-size: 0.8rem;
|
||
line-height: 1.45;
|
||
color: var(--color-fg-secondary);
|
||
overflow-wrap: anywhere;
|
||
}
|
||
.resource-list ul {
|
||
margin: 0.2rem 0 0 1rem;
|
||
display: grid;
|
||
gap: 0.2rem;
|
||
}
|
||
.resource-source a,
|
||
.resource-list a,
|
||
.resource-line a {
|
||
color: var(--color-fg-primary);
|
||
text-decoration: underline;
|
||
text-underline-offset: 3px;
|
||
}
|
||
.resource-ranking th[scope='row'] {
|
||
white-space: nowrap;
|
||
}
|
||
.resource-item > summary::-webkit-details-marker {
|
||
display: none;
|
||
}
|
||
.resource-item > summary::before {
|
||
content: '+';
|
||
width: 1ch;
|
||
font-family: var(--font-mono);
|
||
color: var(--color-fg-tertiary);
|
||
}
|
||
.resource-item[open] > summary::before {
|
||
content: '−';
|
||
}
|
||
/* The figures table sits in a narrow panel on every screen, so it is laid out
|
||
by ITS width, not the viewport's. Four columns only where they fit; below
|
||
that each measure is a block: label and value on one line, then the year
|
||
before and the world standing, each an unbreakable figure group. */
|
||
.resource-figures-wrap {
|
||
container-type: inline-size;
|
||
}
|
||
.resource-figures td {
|
||
font-variant-numeric: tabular-nums;
|
||
}
|
||
.resource-nowrap,
|
||
.resource-figures .resource-value {
|
||
white-space: nowrap;
|
||
}
|
||
.resource-cell-label {
|
||
display: none;
|
||
color: var(--color-fg-tertiary);
|
||
}
|
||
@container (max-width: 36rem) {
|
||
.series-table.resource-figures thead {
|
||
display: none;
|
||
}
|
||
.series-table.resource-figures tr {
|
||
display: grid;
|
||
grid-template-columns: minmax(0, 1fr) auto;
|
||
gap: 0.2rem 1rem;
|
||
padding: 0.6rem 0;
|
||
border-bottom: 1px solid var(--color-border-subtle);
|
||
}
|
||
.series-table.resource-figures th,
|
||
.series-table.resource-figures td {
|
||
padding: 0;
|
||
border: 0;
|
||
}
|
||
.series-table.resource-figures .resource-value {
|
||
text-align: right;
|
||
}
|
||
.series-table.resource-figures td:nth-child(n + 3) {
|
||
grid-column: 1 / -1;
|
||
color: var(--color-fg-secondary);
|
||
}
|
||
.resource-cell-label {
|
||
display: inline;
|
||
}
|
||
}
|