Samle CSS i én delt fil og oppdater stempler
Flytt identisk style.css fra kalkulatorkatalogene til public/style.css og oppdater alle index.html til å referere ../style.css. Nye stempler: «Penger lager penger» (sparing), «Boligfesten» (bolig), «Fødselsloteriet» (arv) + sarkastisk åpning i arv-banneret. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3ffb404250
commit
22373c250b
10 changed files with 20 additions and 1122 deletions
11
CLAUDE.md
11
CLAUDE.md
|
|
@ -8,13 +8,16 @@ Collection of interactive calculators visualizing how seemingly small difference
|
||||||
|
|
||||||
## Architecture
|
## Architecture
|
||||||
|
|
||||||
Static site in `public/` — no build system, no package manager. Serve `public/` as the site root. Each topic gets its own subdirectory with `index.html`, `style.css`, `app.js`.
|
Static site in `public/` — no build system, no package manager. Serve `public/` as the site root. Each topic gets its own subdirectory with `index.html` and `app.js`.
|
||||||
|
|
||||||
|
### Shared CSS
|
||||||
|
|
||||||
|
`public/style.css` — Shared stylesheet used by all calculators (referenced as `../style.css`). CSS custom properties in `:root`, CSS Grid layouts, responsive breakpoints at 560px/480px/360px. Calculators can add a supplementary `<style>` block or extra CSS file for page-specific styles if needed.
|
||||||
|
|
||||||
### Shared pattern (all calculators)
|
### Shared pattern (all calculators)
|
||||||
|
|
||||||
Each calculator directory contains three files following the same pattern:
|
Each calculator directory contains two files following the same pattern:
|
||||||
- `index.html` — Header, range-slider controls, stat cards, chart canvases, explainer section
|
- `index.html` — Header, range-slider controls, stat cards, chart canvases, explainer section. Links to `../style.css`.
|
||||||
- `style.css` — Identical copy across all calculators. CSS custom properties in `:root`, CSS Grid layouts, responsive breakpoints at 560px/480px/360px
|
|
||||||
- `app.js` — Self-contained logic with `fmtKr()`, `fmtShort()`, `getData()`, `baseOpts()`, `update()`. Charts update with `'none'` animation mode.
|
- `app.js` — Self-contained logic with `fmtKr()`, `fmtShort()`, `getData()`, `baseOpts()`, `update()`. Charts update with `'none'` animation mode.
|
||||||
|
|
||||||
### Calculators
|
### Calculators
|
||||||
|
|
|
||||||
5
TODO.md
Normal file
5
TODO.md
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
# TODO
|
||||||
|
|
||||||
|
## Nye kalkulatorer
|
||||||
|
|
||||||
|
- [ ] **BNP per innbygger (internasjonale forskjeller)** — Ny kalkulator i `public/verden/` som viser hvordan forskjeller i BNP per innbygger mellom land vokser over tid med prosentvis vekst. Samme prosentvise vekst gir stadig større absolutt gap mellom rike og fattige land.
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<title>Arvens forsprang — interaktiv kalkulator</title>
|
<title>Arvens forsprang — interaktiv kalkulator</title>
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;1,9..144,300&family=DM+Sans:wght@300;400;500&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;1,9..144,300&family=DM+Sans:wght@300;400;500&display=swap" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="style.css">
|
<link rel="stylesheet" href="../style.css">
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
@ -15,12 +15,12 @@
|
||||||
<p class="eyebrow">Lik innsats. Ulikt utgangspunkt.</p>
|
<p class="eyebrow">Lik innsats. Ulikt utgangspunkt.</p>
|
||||||
<h1>Arvens<br><em>forsprang</em></h1>
|
<h1>Arvens<br><em>forsprang</em></h1>
|
||||||
<p class="lead">Person A starter fra null. Person B arver en sum. Begge sparer likt — men gapet lukkes aldri. Se hvordan arv forsterkes over tid.</p>
|
<p class="lead">Person A starter fra null. Person B arver en sum. Begge sparer likt — men gapet lukkes aldri. Se hvordan arv forsterkes over tid.</p>
|
||||||
<div class="stamp">Ulik startlinje</div>
|
<div class="stamp">Fødselsloteriet</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="small-diff-banner">
|
<div class="small-diff-banner">
|
||||||
<span class="sd-icon">↗</span>
|
<span class="sd-icon">↗</span>
|
||||||
<span>En arv på <strong>500 000 kr</strong> vokser til over <strong id="banner-gap">—</strong> på 30 år — uten at B løfter en finger.</span>
|
<span>Pass på å velge rike foreldre. En arv på <strong>500 000 kr</strong> vokser til over <strong id="banner-gap">—</strong> på 30 år — uten at B løfter en finger.</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<title>Boligforskjellen vokser — interaktiv kalkulator</title>
|
<title>Boligforskjellen vokser — interaktiv kalkulator</title>
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;1,9..144,300&family=DM+Sans:wght@300;400;500&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;1,9..144,300&family=DM+Sans:wght@300;400;500&display=swap" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="style.css">
|
<link rel="stylesheet" href="../style.css">
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
<p class="eyebrow">Samme prisvekst. Ikke det samme resultatet.</p>
|
<p class="eyebrow">Samme prisvekst. Ikke det samme resultatet.</p>
|
||||||
<h1>Boligforskjellen<br><em>forsterkes</em></h1>
|
<h1>Boligforskjellen<br><em>forsterkes</em></h1>
|
||||||
<p class="lead">To boliger med ulik pris stiger like mye i prosent — men belåningen forsterker gapet i egenkapital dramatisk.</p>
|
<p class="lead">To boliger med ulik pris stiger like mye i prosent — men belåningen forsterker gapet i egenkapital dramatisk.</p>
|
||||||
<div class="stamp">Belåningseffekten</div>
|
<div class="stamp">Boligfesten</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="small-diff-banner">
|
<div class="small-diff-banner">
|
||||||
|
|
|
||||||
|
|
@ -1,370 +0,0 @@
|
||||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
||||||
|
|
||||||
:root {
|
|
||||||
--bg: #f5f2eb;
|
|
||||||
--bg2: #ede9e0;
|
|
||||||
--bg3: #e4dfd3;
|
|
||||||
--ink: #1a1714;
|
|
||||||
--ink2: #5a5650;
|
|
||||||
--ink3: #8a857e;
|
|
||||||
--accent: #c0392b;
|
|
||||||
--accent2: #2c6e49;
|
|
||||||
--blue: #1a4a8a;
|
|
||||||
--amber: #b5620a;
|
|
||||||
--purple: #4a3a8a;
|
|
||||||
--border: rgba(26,23,20,0.12);
|
|
||||||
--radius: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
html { scroll-behavior: smooth; }
|
|
||||||
|
|
||||||
body {
|
|
||||||
font-family: 'DM Sans', sans-serif;
|
|
||||||
background: var(--bg);
|
|
||||||
color: var(--ink);
|
|
||||||
font-size: 16px;
|
|
||||||
line-height: 1.6;
|
|
||||||
min-height: 100vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* HEADER */
|
|
||||||
header {
|
|
||||||
background: var(--ink);
|
|
||||||
color: var(--bg);
|
|
||||||
padding: 3.5rem 2rem 3rem;
|
|
||||||
text-align: center;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
header::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
inset: 0;
|
|
||||||
background: repeating-linear-gradient(
|
|
||||||
-45deg,
|
|
||||||
transparent,
|
|
||||||
transparent 40px,
|
|
||||||
rgba(255,255,255,0.02) 40px,
|
|
||||||
rgba(255,255,255,0.02) 41px
|
|
||||||
);
|
|
||||||
}
|
|
||||||
header .eyebrow {
|
|
||||||
font-size: 11px;
|
|
||||||
letter-spacing: 0.18em;
|
|
||||||
text-transform: uppercase;
|
|
||||||
color: rgba(245,242,235,0.5);
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
header h1 {
|
|
||||||
font-family: 'Fraunces', serif;
|
|
||||||
font-size: clamp(2.2rem, 6vw, 4rem);
|
|
||||||
font-weight: 600;
|
|
||||||
line-height: 1.1;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
header h1 em {
|
|
||||||
font-style: italic;
|
|
||||||
color: #e8b4a0;
|
|
||||||
}
|
|
||||||
header p.lead {
|
|
||||||
font-size: clamp(0.95rem, 2vw, 1.1rem);
|
|
||||||
color: rgba(245,242,235,0.65);
|
|
||||||
max-width: 560px;
|
|
||||||
margin: 0 auto;
|
|
||||||
font-weight: 300;
|
|
||||||
line-height: 1.7;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* MAIN LAYOUT */
|
|
||||||
main {
|
|
||||||
max-width: 900px;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 2.5rem 1.25rem 4rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* CONTROLS CARD */
|
|
||||||
.controls-card {
|
|
||||||
background: var(--ink);
|
|
||||||
color: var(--bg);
|
|
||||||
border-radius: 8px;
|
|
||||||
padding: 2rem;
|
|
||||||
margin-bottom: 2.5rem;
|
|
||||||
}
|
|
||||||
.controls-card h2 {
|
|
||||||
font-family: 'Fraunces', serif;
|
|
||||||
font-size: 1rem;
|
|
||||||
font-weight: 300;
|
|
||||||
font-style: italic;
|
|
||||||
color: rgba(245,242,235,0.5);
|
|
||||||
margin-bottom: 1.5rem;
|
|
||||||
letter-spacing: 0.03em;
|
|
||||||
}
|
|
||||||
.controls-grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
gap: 1.25rem 2rem;
|
|
||||||
}
|
|
||||||
@media (max-width: 560px) {
|
|
||||||
.controls-grid { grid-template-columns: 1fr; gap: 1rem; }
|
|
||||||
}
|
|
||||||
|
|
||||||
.control-group label {
|
|
||||||
display: block;
|
|
||||||
font-size: 12px;
|
|
||||||
letter-spacing: 0.08em;
|
|
||||||
text-transform: uppercase;
|
|
||||||
color: rgba(245,242,235,0.45);
|
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
.control-group .val-row {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
.control-group input[type=range] {
|
|
||||||
flex: 1;
|
|
||||||
-webkit-appearance: none;
|
|
||||||
height: 3px;
|
|
||||||
background: rgba(245,242,235,0.15);
|
|
||||||
border-radius: 2px;
|
|
||||||
outline: none;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.control-group input[type=range]::-webkit-slider-thumb {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
width: 16px; height: 16px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: var(--bg);
|
|
||||||
cursor: pointer;
|
|
||||||
transition: transform 0.1s;
|
|
||||||
}
|
|
||||||
.control-group input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); }
|
|
||||||
.control-group input[type=range]::-moz-range-thumb {
|
|
||||||
width: 16px; height: 16px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: var(--bg);
|
|
||||||
cursor: pointer;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
.control-group .val-display {
|
|
||||||
font-size: 1rem;
|
|
||||||
font-weight: 500;
|
|
||||||
color: var(--bg);
|
|
||||||
min-width: 80px;
|
|
||||||
text-align: right;
|
|
||||||
font-variant-numeric: tabular-nums;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* STAT STRIP */
|
|
||||||
.stat-strip {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(4, 1fr);
|
|
||||||
gap: 10px;
|
|
||||||
margin-bottom: 2.5rem;
|
|
||||||
}
|
|
||||||
@media (max-width: 600px) {
|
|
||||||
.stat-strip { grid-template-columns: 1fr 1fr; }
|
|
||||||
}
|
|
||||||
@media (max-width: 360px) {
|
|
||||||
.stat-strip { grid-template-columns: 1fr; }
|
|
||||||
}
|
|
||||||
.stat {
|
|
||||||
background: var(--bg2);
|
|
||||||
border: 1px solid var(--border);
|
|
||||||
border-radius: 6px;
|
|
||||||
padding: 1rem 1.1rem;
|
|
||||||
}
|
|
||||||
.stat-label {
|
|
||||||
font-size: 11px;
|
|
||||||
letter-spacing: 0.07em;
|
|
||||||
text-transform: uppercase;
|
|
||||||
color: var(--ink3);
|
|
||||||
margin-bottom: 0.35rem;
|
|
||||||
}
|
|
||||||
.stat-value {
|
|
||||||
font-size: 1.4rem;
|
|
||||||
font-weight: 500;
|
|
||||||
color: var(--ink);
|
|
||||||
font-variant-numeric: tabular-nums;
|
|
||||||
line-height: 1.2;
|
|
||||||
}
|
|
||||||
.stat-sub {
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--ink3);
|
|
||||||
margin-top: 0.2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* CHART SECTIONS */
|
|
||||||
.chart-section {
|
|
||||||
background: #fff;
|
|
||||||
border: 1px solid var(--border);
|
|
||||||
border-radius: 8px;
|
|
||||||
padding: 1.5rem;
|
|
||||||
margin-bottom: 1.25rem;
|
|
||||||
}
|
|
||||||
.chart-header {
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-start;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
gap: 1rem;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
.chart-title {
|
|
||||||
font-family: 'Fraunces', serif;
|
|
||||||
font-size: 1.1rem;
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(--ink);
|
|
||||||
}
|
|
||||||
.chart-desc {
|
|
||||||
font-size: 13px;
|
|
||||||
color: var(--ink3);
|
|
||||||
margin-top: 2px;
|
|
||||||
}
|
|
||||||
.legend {
|
|
||||||
display: flex;
|
|
||||||
gap: 14px;
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--ink2);
|
|
||||||
flex-wrap: wrap;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.legend span { display: flex; align-items: center; gap: 5px; }
|
|
||||||
.swatch {
|
|
||||||
width: 10px; height: 10px;
|
|
||||||
border-radius: 2px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
.swatch.dashed {
|
|
||||||
background: linear-gradient(90deg, var(--sw-color) 50%, transparent 50%);
|
|
||||||
background-size: 6px 2px;
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
background-position: center;
|
|
||||||
background-color: transparent;
|
|
||||||
height: 2px;
|
|
||||||
width: 18px;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
.chart-wrap {
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* INSIGHT BOX */
|
|
||||||
.insight {
|
|
||||||
background: var(--bg2);
|
|
||||||
border-left: 3px solid var(--accent);
|
|
||||||
border-radius: 0 6px 6px 0;
|
|
||||||
padding: 1rem 1.25rem;
|
|
||||||
margin-bottom: 1.25rem;
|
|
||||||
font-size: 0.95rem;
|
|
||||||
color: var(--ink2);
|
|
||||||
line-height: 1.65;
|
|
||||||
}
|
|
||||||
.insight strong { color: var(--ink); font-weight: 500; }
|
|
||||||
|
|
||||||
/* EXPLAINER */
|
|
||||||
.explainer {
|
|
||||||
background: var(--bg3);
|
|
||||||
border: 1px solid var(--border);
|
|
||||||
border-radius: 8px;
|
|
||||||
padding: 1.75rem 2rem;
|
|
||||||
margin-top: 2rem;
|
|
||||||
}
|
|
||||||
.explainer h3 {
|
|
||||||
font-family: 'Fraunces', serif;
|
|
||||||
font-size: 1.2rem;
|
|
||||||
font-weight: 600;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
}
|
|
||||||
.explainer p {
|
|
||||||
font-size: 0.95rem;
|
|
||||||
color: var(--ink2);
|
|
||||||
margin-bottom: 0.75rem;
|
|
||||||
line-height: 1.7;
|
|
||||||
}
|
|
||||||
.explainer p:last-child { margin-bottom: 0; }
|
|
||||||
.explainer strong { color: var(--ink); font-weight: 500; }
|
|
||||||
|
|
||||||
/* FORMULA */
|
|
||||||
.formula-box {
|
|
||||||
background: var(--ink);
|
|
||||||
color: var(--bg);
|
|
||||||
border-radius: 6px;
|
|
||||||
padding: 1rem 1.25rem;
|
|
||||||
font-family: 'DM Sans', monospace;
|
|
||||||
font-size: 0.9rem;
|
|
||||||
margin: 1rem 0;
|
|
||||||
letter-spacing: 0.02em;
|
|
||||||
line-height: 1.8;
|
|
||||||
}
|
|
||||||
.formula-box span { color: #e8b4a0; }
|
|
||||||
|
|
||||||
/* STAMP */
|
|
||||||
.stamp {
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
margin-top: 2rem;
|
|
||||||
padding: 0.55rem 1.1rem;
|
|
||||||
border: 3px solid #e8b4a0;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-family: 'Fraunces', serif;
|
|
||||||
font-size: clamp(0.75rem, 2.5vw, 0.95rem);
|
|
||||||
font-weight: 600;
|
|
||||||
letter-spacing: 0.12em;
|
|
||||||
text-transform: uppercase;
|
|
||||||
color: #e8b4a0;
|
|
||||||
opacity: 0.72;
|
|
||||||
transform: rotate(-4deg);
|
|
||||||
box-shadow: inset 0 0 0 2px rgba(232,180,160,0.18);
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
.stamp::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
inset: 3px;
|
|
||||||
border: 1px solid rgba(232,180,160,0.3);
|
|
||||||
border-radius: 2px;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* SMALL DIFF BANNER */
|
|
||||||
.small-diff-banner {
|
|
||||||
background: var(--accent);
|
|
||||||
color: #fff;
|
|
||||||
padding: 1rem 2rem;
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-start;
|
|
||||||
gap: 0.75rem;
|
|
||||||
font-size: clamp(0.88rem, 2vw, 1rem);
|
|
||||||
line-height: 1.6;
|
|
||||||
}
|
|
||||||
.small-diff-banner strong { font-weight: 500; }
|
|
||||||
.sd-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
|
|
||||||
|
|
||||||
/* FOOTER */
|
|
||||||
footer {
|
|
||||||
text-align: center;
|
|
||||||
padding: 2rem 1rem;
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--ink3);
|
|
||||||
border-top: 1px solid var(--border);
|
|
||||||
margin-top: 3rem;
|
|
||||||
}
|
|
||||||
footer a { color: var(--ink3); }
|
|
||||||
|
|
||||||
/* RESPONSIVE CHART HEIGHTS */
|
|
||||||
.h-240 { height: 240px; }
|
|
||||||
.h-200 { height: 200px; }
|
|
||||||
@media (max-width: 480px) {
|
|
||||||
.h-240 { height: 200px; }
|
|
||||||
.h-200 { height: 170px; }
|
|
||||||
.chart-section { padding: 1rem; }
|
|
||||||
main { padding: 1.5rem 1rem 3rem; }
|
|
||||||
.controls-card { padding: 1.25rem; }
|
|
||||||
.explainer { padding: 1.25rem; }
|
|
||||||
}
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<title>Lønnsforskjellen vokser — interaktiv kalkulator</title>
|
<title>Lønnsforskjellen vokser — interaktiv kalkulator</title>
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;1,9..144,300&family=DM+Sans:wght@300;400;500&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;1,9..144,300&family=DM+Sans:wght@300;400;500&display=swap" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="style.css">
|
<link rel="stylesheet" href="../style.css">
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
|
||||||
|
|
@ -1,370 +0,0 @@
|
||||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
||||||
|
|
||||||
:root {
|
|
||||||
--bg: #f5f2eb;
|
|
||||||
--bg2: #ede9e0;
|
|
||||||
--bg3: #e4dfd3;
|
|
||||||
--ink: #1a1714;
|
|
||||||
--ink2: #5a5650;
|
|
||||||
--ink3: #8a857e;
|
|
||||||
--accent: #c0392b;
|
|
||||||
--accent2: #2c6e49;
|
|
||||||
--blue: #1a4a8a;
|
|
||||||
--amber: #b5620a;
|
|
||||||
--purple: #4a3a8a;
|
|
||||||
--border: rgba(26,23,20,0.12);
|
|
||||||
--radius: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
html { scroll-behavior: smooth; }
|
|
||||||
|
|
||||||
body {
|
|
||||||
font-family: 'DM Sans', sans-serif;
|
|
||||||
background: var(--bg);
|
|
||||||
color: var(--ink);
|
|
||||||
font-size: 16px;
|
|
||||||
line-height: 1.6;
|
|
||||||
min-height: 100vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* HEADER */
|
|
||||||
header {
|
|
||||||
background: var(--ink);
|
|
||||||
color: var(--bg);
|
|
||||||
padding: 3.5rem 2rem 3rem;
|
|
||||||
text-align: center;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
header::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
inset: 0;
|
|
||||||
background: repeating-linear-gradient(
|
|
||||||
-45deg,
|
|
||||||
transparent,
|
|
||||||
transparent 40px,
|
|
||||||
rgba(255,255,255,0.02) 40px,
|
|
||||||
rgba(255,255,255,0.02) 41px
|
|
||||||
);
|
|
||||||
}
|
|
||||||
header .eyebrow {
|
|
||||||
font-size: 11px;
|
|
||||||
letter-spacing: 0.18em;
|
|
||||||
text-transform: uppercase;
|
|
||||||
color: rgba(245,242,235,0.5);
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
header h1 {
|
|
||||||
font-family: 'Fraunces', serif;
|
|
||||||
font-size: clamp(2.2rem, 6vw, 4rem);
|
|
||||||
font-weight: 600;
|
|
||||||
line-height: 1.1;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
header h1 em {
|
|
||||||
font-style: italic;
|
|
||||||
color: #e8b4a0;
|
|
||||||
}
|
|
||||||
header p.lead {
|
|
||||||
font-size: clamp(0.95rem, 2vw, 1.1rem);
|
|
||||||
color: rgba(245,242,235,0.65);
|
|
||||||
max-width: 560px;
|
|
||||||
margin: 0 auto;
|
|
||||||
font-weight: 300;
|
|
||||||
line-height: 1.7;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* MAIN LAYOUT */
|
|
||||||
main {
|
|
||||||
max-width: 900px;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 2.5rem 1.25rem 4rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* CONTROLS CARD */
|
|
||||||
.controls-card {
|
|
||||||
background: var(--ink);
|
|
||||||
color: var(--bg);
|
|
||||||
border-radius: 8px;
|
|
||||||
padding: 2rem;
|
|
||||||
margin-bottom: 2.5rem;
|
|
||||||
}
|
|
||||||
.controls-card h2 {
|
|
||||||
font-family: 'Fraunces', serif;
|
|
||||||
font-size: 1rem;
|
|
||||||
font-weight: 300;
|
|
||||||
font-style: italic;
|
|
||||||
color: rgba(245,242,235,0.5);
|
|
||||||
margin-bottom: 1.5rem;
|
|
||||||
letter-spacing: 0.03em;
|
|
||||||
}
|
|
||||||
.controls-grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
gap: 1.25rem 2rem;
|
|
||||||
}
|
|
||||||
@media (max-width: 560px) {
|
|
||||||
.controls-grid { grid-template-columns: 1fr; gap: 1rem; }
|
|
||||||
}
|
|
||||||
|
|
||||||
.control-group label {
|
|
||||||
display: block;
|
|
||||||
font-size: 12px;
|
|
||||||
letter-spacing: 0.08em;
|
|
||||||
text-transform: uppercase;
|
|
||||||
color: rgba(245,242,235,0.45);
|
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
.control-group .val-row {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
.control-group input[type=range] {
|
|
||||||
flex: 1;
|
|
||||||
-webkit-appearance: none;
|
|
||||||
height: 3px;
|
|
||||||
background: rgba(245,242,235,0.15);
|
|
||||||
border-radius: 2px;
|
|
||||||
outline: none;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.control-group input[type=range]::-webkit-slider-thumb {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
width: 16px; height: 16px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: var(--bg);
|
|
||||||
cursor: pointer;
|
|
||||||
transition: transform 0.1s;
|
|
||||||
}
|
|
||||||
.control-group input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); }
|
|
||||||
.control-group input[type=range]::-moz-range-thumb {
|
|
||||||
width: 16px; height: 16px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: var(--bg);
|
|
||||||
cursor: pointer;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
.control-group .val-display {
|
|
||||||
font-size: 1rem;
|
|
||||||
font-weight: 500;
|
|
||||||
color: var(--bg);
|
|
||||||
min-width: 80px;
|
|
||||||
text-align: right;
|
|
||||||
font-variant-numeric: tabular-nums;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* STAT STRIP */
|
|
||||||
.stat-strip {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(4, 1fr);
|
|
||||||
gap: 10px;
|
|
||||||
margin-bottom: 2.5rem;
|
|
||||||
}
|
|
||||||
@media (max-width: 600px) {
|
|
||||||
.stat-strip { grid-template-columns: 1fr 1fr; }
|
|
||||||
}
|
|
||||||
@media (max-width: 360px) {
|
|
||||||
.stat-strip { grid-template-columns: 1fr; }
|
|
||||||
}
|
|
||||||
.stat {
|
|
||||||
background: var(--bg2);
|
|
||||||
border: 1px solid var(--border);
|
|
||||||
border-radius: 6px;
|
|
||||||
padding: 1rem 1.1rem;
|
|
||||||
}
|
|
||||||
.stat-label {
|
|
||||||
font-size: 11px;
|
|
||||||
letter-spacing: 0.07em;
|
|
||||||
text-transform: uppercase;
|
|
||||||
color: var(--ink3);
|
|
||||||
margin-bottom: 0.35rem;
|
|
||||||
}
|
|
||||||
.stat-value {
|
|
||||||
font-size: 1.4rem;
|
|
||||||
font-weight: 500;
|
|
||||||
color: var(--ink);
|
|
||||||
font-variant-numeric: tabular-nums;
|
|
||||||
line-height: 1.2;
|
|
||||||
}
|
|
||||||
.stat-sub {
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--ink3);
|
|
||||||
margin-top: 0.2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* CHART SECTIONS */
|
|
||||||
.chart-section {
|
|
||||||
background: #fff;
|
|
||||||
border: 1px solid var(--border);
|
|
||||||
border-radius: 8px;
|
|
||||||
padding: 1.5rem;
|
|
||||||
margin-bottom: 1.25rem;
|
|
||||||
}
|
|
||||||
.chart-header {
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-start;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
gap: 1rem;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
.chart-title {
|
|
||||||
font-family: 'Fraunces', serif;
|
|
||||||
font-size: 1.1rem;
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(--ink);
|
|
||||||
}
|
|
||||||
.chart-desc {
|
|
||||||
font-size: 13px;
|
|
||||||
color: var(--ink3);
|
|
||||||
margin-top: 2px;
|
|
||||||
}
|
|
||||||
.legend {
|
|
||||||
display: flex;
|
|
||||||
gap: 14px;
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--ink2);
|
|
||||||
flex-wrap: wrap;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.legend span { display: flex; align-items: center; gap: 5px; }
|
|
||||||
.swatch {
|
|
||||||
width: 10px; height: 10px;
|
|
||||||
border-radius: 2px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
.swatch.dashed {
|
|
||||||
background: linear-gradient(90deg, var(--sw-color) 50%, transparent 50%);
|
|
||||||
background-size: 6px 2px;
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
background-position: center;
|
|
||||||
background-color: transparent;
|
|
||||||
height: 2px;
|
|
||||||
width: 18px;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
.chart-wrap {
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* INSIGHT BOX */
|
|
||||||
.insight {
|
|
||||||
background: var(--bg2);
|
|
||||||
border-left: 3px solid var(--accent);
|
|
||||||
border-radius: 0 6px 6px 0;
|
|
||||||
padding: 1rem 1.25rem;
|
|
||||||
margin-bottom: 1.25rem;
|
|
||||||
font-size: 0.95rem;
|
|
||||||
color: var(--ink2);
|
|
||||||
line-height: 1.65;
|
|
||||||
}
|
|
||||||
.insight strong { color: var(--ink); font-weight: 500; }
|
|
||||||
|
|
||||||
/* EXPLAINER */
|
|
||||||
.explainer {
|
|
||||||
background: var(--bg3);
|
|
||||||
border: 1px solid var(--border);
|
|
||||||
border-radius: 8px;
|
|
||||||
padding: 1.75rem 2rem;
|
|
||||||
margin-top: 2rem;
|
|
||||||
}
|
|
||||||
.explainer h3 {
|
|
||||||
font-family: 'Fraunces', serif;
|
|
||||||
font-size: 1.2rem;
|
|
||||||
font-weight: 600;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
}
|
|
||||||
.explainer p {
|
|
||||||
font-size: 0.95rem;
|
|
||||||
color: var(--ink2);
|
|
||||||
margin-bottom: 0.75rem;
|
|
||||||
line-height: 1.7;
|
|
||||||
}
|
|
||||||
.explainer p:last-child { margin-bottom: 0; }
|
|
||||||
.explainer strong { color: var(--ink); font-weight: 500; }
|
|
||||||
|
|
||||||
/* FORMULA */
|
|
||||||
.formula-box {
|
|
||||||
background: var(--ink);
|
|
||||||
color: var(--bg);
|
|
||||||
border-radius: 6px;
|
|
||||||
padding: 1rem 1.25rem;
|
|
||||||
font-family: 'DM Sans', monospace;
|
|
||||||
font-size: 0.9rem;
|
|
||||||
margin: 1rem 0;
|
|
||||||
letter-spacing: 0.02em;
|
|
||||||
line-height: 1.8;
|
|
||||||
}
|
|
||||||
.formula-box span { color: #e8b4a0; }
|
|
||||||
|
|
||||||
/* STAMP */
|
|
||||||
.stamp {
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
margin-top: 2rem;
|
|
||||||
padding: 0.55rem 1.1rem;
|
|
||||||
border: 3px solid #e8b4a0;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-family: 'Fraunces', serif;
|
|
||||||
font-size: clamp(0.75rem, 2.5vw, 0.95rem);
|
|
||||||
font-weight: 600;
|
|
||||||
letter-spacing: 0.12em;
|
|
||||||
text-transform: uppercase;
|
|
||||||
color: #e8b4a0;
|
|
||||||
opacity: 0.72;
|
|
||||||
transform: rotate(-4deg);
|
|
||||||
box-shadow: inset 0 0 0 2px rgba(232,180,160,0.18);
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
.stamp::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
inset: 3px;
|
|
||||||
border: 1px solid rgba(232,180,160,0.3);
|
|
||||||
border-radius: 2px;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* SMALL DIFF BANNER */
|
|
||||||
.small-diff-banner {
|
|
||||||
background: var(--accent);
|
|
||||||
color: #fff;
|
|
||||||
padding: 1rem 2rem;
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-start;
|
|
||||||
gap: 0.75rem;
|
|
||||||
font-size: clamp(0.88rem, 2vw, 1rem);
|
|
||||||
line-height: 1.6;
|
|
||||||
}
|
|
||||||
.small-diff-banner strong { font-weight: 500; }
|
|
||||||
.sd-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
|
|
||||||
|
|
||||||
/* FOOTER */
|
|
||||||
footer {
|
|
||||||
text-align: center;
|
|
||||||
padding: 2rem 1rem;
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--ink3);
|
|
||||||
border-top: 1px solid var(--border);
|
|
||||||
margin-top: 3rem;
|
|
||||||
}
|
|
||||||
footer a { color: var(--ink3); }
|
|
||||||
|
|
||||||
/* RESPONSIVE CHART HEIGHTS */
|
|
||||||
.h-240 { height: 240px; }
|
|
||||||
.h-200 { height: 200px; }
|
|
||||||
@media (max-width: 480px) {
|
|
||||||
.h-240 { height: 200px; }
|
|
||||||
.h-200 { height: 170px; }
|
|
||||||
.chart-section { padding: 1rem; }
|
|
||||||
main { padding: 1.5rem 1rem 3rem; }
|
|
||||||
.controls-card { padding: 1.25rem; }
|
|
||||||
.explainer { padding: 1.25rem; }
|
|
||||||
}
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<title>Rentes rente — interaktiv kalkulator</title>
|
<title>Rentes rente — interaktiv kalkulator</title>
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;1,9..144,300&family=DM+Sans:wght@300;400;500&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,600;1,9..144,300&family=DM+Sans:wght@300;400;500&display=swap" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="style.css">
|
<link rel="stylesheet" href="../style.css">
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.js"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/4.4.1/chart.umd.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
<p class="eyebrow">Samme sparebeløp. Ikke det samme resultatet.</p>
|
<p class="eyebrow">Samme sparebeløp. Ikke det samme resultatet.</p>
|
||||||
<h1>Rentes rente<br><em>forsterker</em></h1>
|
<h1>Rentes rente<br><em>forsterker</em></h1>
|
||||||
<p class="lead">Noen få prosentpoeng i avkastning ser ubetydelig ut — men over tid skaper de enorme forskjeller. Se hva rentes rente gjør med sparepengene dine.</p>
|
<p class="lead">Noen få prosentpoeng i avkastning ser ubetydelig ut — men over tid skaper de enorme forskjeller. Se hva rentes rente gjør med sparepengene dine.</p>
|
||||||
<div class="stamp">Tid i markedet</div>
|
<div class="stamp">Penger lager penger</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="small-diff-banner">
|
<div class="small-diff-banner">
|
||||||
|
|
|
||||||
|
|
@ -1,370 +0,0 @@
|
||||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
||||||
|
|
||||||
:root {
|
|
||||||
--bg: #f5f2eb;
|
|
||||||
--bg2: #ede9e0;
|
|
||||||
--bg3: #e4dfd3;
|
|
||||||
--ink: #1a1714;
|
|
||||||
--ink2: #5a5650;
|
|
||||||
--ink3: #8a857e;
|
|
||||||
--accent: #c0392b;
|
|
||||||
--accent2: #2c6e49;
|
|
||||||
--blue: #1a4a8a;
|
|
||||||
--amber: #b5620a;
|
|
||||||
--purple: #4a3a8a;
|
|
||||||
--border: rgba(26,23,20,0.12);
|
|
||||||
--radius: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
html { scroll-behavior: smooth; }
|
|
||||||
|
|
||||||
body {
|
|
||||||
font-family: 'DM Sans', sans-serif;
|
|
||||||
background: var(--bg);
|
|
||||||
color: var(--ink);
|
|
||||||
font-size: 16px;
|
|
||||||
line-height: 1.6;
|
|
||||||
min-height: 100vh;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* HEADER */
|
|
||||||
header {
|
|
||||||
background: var(--ink);
|
|
||||||
color: var(--bg);
|
|
||||||
padding: 3.5rem 2rem 3rem;
|
|
||||||
text-align: center;
|
|
||||||
position: relative;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
header::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
inset: 0;
|
|
||||||
background: repeating-linear-gradient(
|
|
||||||
-45deg,
|
|
||||||
transparent,
|
|
||||||
transparent 40px,
|
|
||||||
rgba(255,255,255,0.02) 40px,
|
|
||||||
rgba(255,255,255,0.02) 41px
|
|
||||||
);
|
|
||||||
}
|
|
||||||
header .eyebrow {
|
|
||||||
font-size: 11px;
|
|
||||||
letter-spacing: 0.18em;
|
|
||||||
text-transform: uppercase;
|
|
||||||
color: rgba(245,242,235,0.5);
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
header h1 {
|
|
||||||
font-family: 'Fraunces', serif;
|
|
||||||
font-size: clamp(2.2rem, 6vw, 4rem);
|
|
||||||
font-weight: 600;
|
|
||||||
line-height: 1.1;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
header h1 em {
|
|
||||||
font-style: italic;
|
|
||||||
color: #e8b4a0;
|
|
||||||
}
|
|
||||||
header p.lead {
|
|
||||||
font-size: clamp(0.95rem, 2vw, 1.1rem);
|
|
||||||
color: rgba(245,242,235,0.65);
|
|
||||||
max-width: 560px;
|
|
||||||
margin: 0 auto;
|
|
||||||
font-weight: 300;
|
|
||||||
line-height: 1.7;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* MAIN LAYOUT */
|
|
||||||
main {
|
|
||||||
max-width: 900px;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding: 2.5rem 1.25rem 4rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* CONTROLS CARD */
|
|
||||||
.controls-card {
|
|
||||||
background: var(--ink);
|
|
||||||
color: var(--bg);
|
|
||||||
border-radius: 8px;
|
|
||||||
padding: 2rem;
|
|
||||||
margin-bottom: 2.5rem;
|
|
||||||
}
|
|
||||||
.controls-card h2 {
|
|
||||||
font-family: 'Fraunces', serif;
|
|
||||||
font-size: 1rem;
|
|
||||||
font-weight: 300;
|
|
||||||
font-style: italic;
|
|
||||||
color: rgba(245,242,235,0.5);
|
|
||||||
margin-bottom: 1.5rem;
|
|
||||||
letter-spacing: 0.03em;
|
|
||||||
}
|
|
||||||
.controls-grid {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 1fr;
|
|
||||||
gap: 1.25rem 2rem;
|
|
||||||
}
|
|
||||||
@media (max-width: 560px) {
|
|
||||||
.controls-grid { grid-template-columns: 1fr; gap: 1rem; }
|
|
||||||
}
|
|
||||||
|
|
||||||
.control-group label {
|
|
||||||
display: block;
|
|
||||||
font-size: 12px;
|
|
||||||
letter-spacing: 0.08em;
|
|
||||||
text-transform: uppercase;
|
|
||||||
color: rgba(245,242,235,0.45);
|
|
||||||
margin-bottom: 0.5rem;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
.control-group .val-row {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 10px;
|
|
||||||
}
|
|
||||||
.control-group input[type=range] {
|
|
||||||
flex: 1;
|
|
||||||
-webkit-appearance: none;
|
|
||||||
height: 3px;
|
|
||||||
background: rgba(245,242,235,0.15);
|
|
||||||
border-radius: 2px;
|
|
||||||
outline: none;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.control-group input[type=range]::-webkit-slider-thumb {
|
|
||||||
-webkit-appearance: none;
|
|
||||||
width: 16px; height: 16px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: var(--bg);
|
|
||||||
cursor: pointer;
|
|
||||||
transition: transform 0.1s;
|
|
||||||
}
|
|
||||||
.control-group input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); }
|
|
||||||
.control-group input[type=range]::-moz-range-thumb {
|
|
||||||
width: 16px; height: 16px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: var(--bg);
|
|
||||||
cursor: pointer;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
.control-group .val-display {
|
|
||||||
font-size: 1rem;
|
|
||||||
font-weight: 500;
|
|
||||||
color: var(--bg);
|
|
||||||
min-width: 80px;
|
|
||||||
text-align: right;
|
|
||||||
font-variant-numeric: tabular-nums;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* STAT STRIP */
|
|
||||||
.stat-strip {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: repeat(4, 1fr);
|
|
||||||
gap: 10px;
|
|
||||||
margin-bottom: 2.5rem;
|
|
||||||
}
|
|
||||||
@media (max-width: 600px) {
|
|
||||||
.stat-strip { grid-template-columns: 1fr 1fr; }
|
|
||||||
}
|
|
||||||
@media (max-width: 360px) {
|
|
||||||
.stat-strip { grid-template-columns: 1fr; }
|
|
||||||
}
|
|
||||||
.stat {
|
|
||||||
background: var(--bg2);
|
|
||||||
border: 1px solid var(--border);
|
|
||||||
border-radius: 6px;
|
|
||||||
padding: 1rem 1.1rem;
|
|
||||||
}
|
|
||||||
.stat-label {
|
|
||||||
font-size: 11px;
|
|
||||||
letter-spacing: 0.07em;
|
|
||||||
text-transform: uppercase;
|
|
||||||
color: var(--ink3);
|
|
||||||
margin-bottom: 0.35rem;
|
|
||||||
}
|
|
||||||
.stat-value {
|
|
||||||
font-size: 1.4rem;
|
|
||||||
font-weight: 500;
|
|
||||||
color: var(--ink);
|
|
||||||
font-variant-numeric: tabular-nums;
|
|
||||||
line-height: 1.2;
|
|
||||||
}
|
|
||||||
.stat-sub {
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--ink3);
|
|
||||||
margin-top: 0.2rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* CHART SECTIONS */
|
|
||||||
.chart-section {
|
|
||||||
background: #fff;
|
|
||||||
border: 1px solid var(--border);
|
|
||||||
border-radius: 8px;
|
|
||||||
padding: 1.5rem;
|
|
||||||
margin-bottom: 1.25rem;
|
|
||||||
}
|
|
||||||
.chart-header {
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-start;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
gap: 1rem;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
}
|
|
||||||
.chart-title {
|
|
||||||
font-family: 'Fraunces', serif;
|
|
||||||
font-size: 1.1rem;
|
|
||||||
font-weight: 600;
|
|
||||||
color: var(--ink);
|
|
||||||
}
|
|
||||||
.chart-desc {
|
|
||||||
font-size: 13px;
|
|
||||||
color: var(--ink3);
|
|
||||||
margin-top: 2px;
|
|
||||||
}
|
|
||||||
.legend {
|
|
||||||
display: flex;
|
|
||||||
gap: 14px;
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--ink2);
|
|
||||||
flex-wrap: wrap;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
.legend span { display: flex; align-items: center; gap: 5px; }
|
|
||||||
.swatch {
|
|
||||||
width: 10px; height: 10px;
|
|
||||||
border-radius: 2px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
.swatch.dashed {
|
|
||||||
background: linear-gradient(90deg, var(--sw-color) 50%, transparent 50%);
|
|
||||||
background-size: 6px 2px;
|
|
||||||
background-repeat: repeat-x;
|
|
||||||
background-position: center;
|
|
||||||
background-color: transparent;
|
|
||||||
height: 2px;
|
|
||||||
width: 18px;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
.chart-wrap {
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* INSIGHT BOX */
|
|
||||||
.insight {
|
|
||||||
background: var(--bg2);
|
|
||||||
border-left: 3px solid var(--accent);
|
|
||||||
border-radius: 0 6px 6px 0;
|
|
||||||
padding: 1rem 1.25rem;
|
|
||||||
margin-bottom: 1.25rem;
|
|
||||||
font-size: 0.95rem;
|
|
||||||
color: var(--ink2);
|
|
||||||
line-height: 1.65;
|
|
||||||
}
|
|
||||||
.insight strong { color: var(--ink); font-weight: 500; }
|
|
||||||
|
|
||||||
/* EXPLAINER */
|
|
||||||
.explainer {
|
|
||||||
background: var(--bg3);
|
|
||||||
border: 1px solid var(--border);
|
|
||||||
border-radius: 8px;
|
|
||||||
padding: 1.75rem 2rem;
|
|
||||||
margin-top: 2rem;
|
|
||||||
}
|
|
||||||
.explainer h3 {
|
|
||||||
font-family: 'Fraunces', serif;
|
|
||||||
font-size: 1.2rem;
|
|
||||||
font-weight: 600;
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
}
|
|
||||||
.explainer p {
|
|
||||||
font-size: 0.95rem;
|
|
||||||
color: var(--ink2);
|
|
||||||
margin-bottom: 0.75rem;
|
|
||||||
line-height: 1.7;
|
|
||||||
}
|
|
||||||
.explainer p:last-child { margin-bottom: 0; }
|
|
||||||
.explainer strong { color: var(--ink); font-weight: 500; }
|
|
||||||
|
|
||||||
/* FORMULA */
|
|
||||||
.formula-box {
|
|
||||||
background: var(--ink);
|
|
||||||
color: var(--bg);
|
|
||||||
border-radius: 6px;
|
|
||||||
padding: 1rem 1.25rem;
|
|
||||||
font-family: 'DM Sans', monospace;
|
|
||||||
font-size: 0.9rem;
|
|
||||||
margin: 1rem 0;
|
|
||||||
letter-spacing: 0.02em;
|
|
||||||
line-height: 1.8;
|
|
||||||
}
|
|
||||||
.formula-box span { color: #e8b4a0; }
|
|
||||||
|
|
||||||
/* STAMP */
|
|
||||||
.stamp {
|
|
||||||
display: inline-block;
|
|
||||||
position: relative;
|
|
||||||
margin-top: 2rem;
|
|
||||||
padding: 0.55rem 1.1rem;
|
|
||||||
border: 3px solid #e8b4a0;
|
|
||||||
border-radius: 4px;
|
|
||||||
font-family: 'Fraunces', serif;
|
|
||||||
font-size: clamp(0.75rem, 2.5vw, 0.95rem);
|
|
||||||
font-weight: 600;
|
|
||||||
letter-spacing: 0.12em;
|
|
||||||
text-transform: uppercase;
|
|
||||||
color: #e8b4a0;
|
|
||||||
opacity: 0.72;
|
|
||||||
transform: rotate(-4deg);
|
|
||||||
box-shadow: inset 0 0 0 2px rgba(232,180,160,0.18);
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
.stamp::before {
|
|
||||||
content: '';
|
|
||||||
position: absolute;
|
|
||||||
inset: 3px;
|
|
||||||
border: 1px solid rgba(232,180,160,0.3);
|
|
||||||
border-radius: 2px;
|
|
||||||
pointer-events: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* SMALL DIFF BANNER */
|
|
||||||
.small-diff-banner {
|
|
||||||
background: var(--accent);
|
|
||||||
color: #fff;
|
|
||||||
padding: 1rem 2rem;
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-start;
|
|
||||||
gap: 0.75rem;
|
|
||||||
font-size: clamp(0.88rem, 2vw, 1rem);
|
|
||||||
line-height: 1.6;
|
|
||||||
}
|
|
||||||
.small-diff-banner strong { font-weight: 500; }
|
|
||||||
.sd-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }
|
|
||||||
|
|
||||||
/* FOOTER */
|
|
||||||
footer {
|
|
||||||
text-align: center;
|
|
||||||
padding: 2rem 1rem;
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--ink3);
|
|
||||||
border-top: 1px solid var(--border);
|
|
||||||
margin-top: 3rem;
|
|
||||||
}
|
|
||||||
footer a { color: var(--ink3); }
|
|
||||||
|
|
||||||
/* RESPONSIVE CHART HEIGHTS */
|
|
||||||
.h-240 { height: 240px; }
|
|
||||||
.h-200 { height: 200px; }
|
|
||||||
@media (max-width: 480px) {
|
|
||||||
.h-240 { height: 200px; }
|
|
||||||
.h-200 { height: 170px; }
|
|
||||||
.chart-section { padding: 1rem; }
|
|
||||||
main { padding: 1.5rem 1rem 3rem; }
|
|
||||||
.controls-card { padding: 1.25rem; }
|
|
||||||
.explainer { padding: 1.25rem; }
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue