/* Valuuttakurssi.fi — "Kurssilehti". Implements STYLE_RULES.md. Change tokens, not values. */

@font-face { font-family: 'Newsreader'; src: url('fonts/newsreader.woff2') format('woff2'); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: 'Newsreader'; src: url('fonts/newsreader-italic.woff2') format('woff2'); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'Schibsted Grotesk'; src: url('fonts/schibsted-grotesk.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }

:root {
  /* Dark is the default theme. */
  --paper: #13130F;
  --paper-2: #1C1B16;
  --ink: #ECE6D8;
  --ink-2: #ABA493;
  --rule-soft: rgba(236, 230, 216, .2);
  --rule-dot: rgba(236, 230, 216, .4);
  --sekki: #8E9DFF;
  --up: #6BC48A;
  --down: #F07A5E;

  --serif: 'Newsreader', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --grotesk: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif;

  --gutter: 24px;
  --ease-pen: cubic-bezier(.6, .05, .25, 1);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --t-fast: 150ms; --t-med: 280ms; --t-slow: 800ms;

  color-scheme: dark;
}

/* Light: the reader's choice from the masthead toggle (Tumma / Vaalea), set on <html> before paint. */
:root[data-theme='light'] {
  --paper: #F1ECE1;
  --paper-2: #E7E0CF;
  --ink: #16150F;
  --ink-2: #4F4A3E;
  --rule-soft: rgba(22, 21, 15, .18);
  --rule-dot: rgba(22, 21, 15, .42);
  --sekki: #2338A8;
  --up: #1C6B3C;
  --down: #B8321A;
  color-scheme: light;
}

/* ------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  font-family: var(--serif);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
  font-variant-numeric: lining-nums;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--sekki); text-decoration-thickness: 1px; text-underline-offset: 3px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.02em; line-height: 1.05; text-wrap: balance; }
p { text-wrap: pretty; }
abbr[title] { text-decoration: none; }
:focus-visible { outline: 2px solid var(--sekki); outline-offset: 2px; }
::selection { background: var(--sekki); color: var(--paper); }

.num { font-variant-numeric: tabular-nums lining-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); }
.skip { position: absolute; left: 16px; top: -100px; z-index: 100; padding: 8px 14px; background: var(--ink); color: var(--paper); font-family: var(--grotesk); font-weight: 700; }
.skip:focus { top: 12px; }

.chg { display: inline-flex; align-items: baseline; gap: 3px; font-family: var(--grotesk); font-size: .8125rem; font-weight: 700; white-space: nowrap; }
.chg span[aria-hidden] { font-size: .7em; }
.chg--up { color: var(--up); }
.chg--down { color: var(--down); }
.chg--flat { color: var(--ink-2); }

/* ------------------------------------------------------------ masthead */
.masthead { padding-top: 8px; }
.mh-strip {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 6px 0; border-bottom: 1px solid var(--ink);
  font-family: var(--grotesk); font-size: .8125rem; font-weight: 600;
}
.mh-theme { flex: none; padding: 0; border: 0; background: none; font: inherit; color: var(--ink-2); }
.mh-theme span { text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 4px; transition: color var(--t-fast), text-decoration-color var(--t-fast); }
.mh-theme:hover span { color: var(--ink); }
:root:not([data-theme='light']) .mh-theme .t-dark, [data-theme='light'] .mh-theme .t-light { color: var(--ink); text-decoration-color: var(--sekki); }
/* One masthead layout on every page, so the menu never moves; only the front page gets the big flag and motto. */
.mh-title { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 0 14px; }
.wordmark {
  display: inline-flex; align-items: center; gap: .16em;
  font-family: var(--serif); font-weight: 700; font-size: 1.875rem; letter-spacing: -.03em; line-height: 1;
  color: var(--ink); text-decoration: none;
}
.wordmark em { font-style: italic; font-weight: 400; color: var(--sekki); letter-spacing: -.01em; }
.mark {
  display: inline-block; flex: none; width: .82em; height: .82em;
  background: var(--sekki);
  -webkit-mask: url('mark.svg') center / contain no-repeat; mask: url('mark.svg') center / contain no-repeat;
  transition: transform 1.2s var(--ease-pen);
}
.wordmark:hover .mark { transform: rotate(180deg); }
.mh-motto { font-style: italic; color: var(--ink-2); font-size: 1.0625rem; }
.mh-nav { position: relative; padding-bottom: 7px; border-top: 1px solid var(--ink); }
.mh-nav::before, .mh-nav::after { content: ''; position: absolute; left: 0; right: 0; background: var(--ink); }
.mh-nav::before { bottom: 5px; height: 1px; }
.mh-nav::after { bottom: 0; height: 3px; }
.mh-nav ul { display: flex; justify-content: center; gap: 28px; list-style: none; padding: 0; overflow-x: auto; scrollbar-width: none; }
.mh-nav a {
  display: block; padding: 9px 0; white-space: nowrap;
  font-family: var(--grotesk); font-size: .9375rem; font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 7px;
  transition: text-decoration-color var(--t-fast);
}
.mh-nav a:hover { text-decoration-color: var(--ink); }
.mh-nav a[aria-current='page'] { text-decoration-color: var(--sekki); }
.nav-short { display: none; }

.masthead .mh-title .wordmark { font-size: clamp(2.25rem, 4.6vw, 3.75rem); letter-spacing: -.04em; }
.masthead--full .mh-title { padding: 26px 0 16px; }
.masthead--full .mh-title .wordmark { font-size: clamp(2.75rem, 7.4vw, 6.5rem); }

.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 14px 0 0; font-family: var(--grotesk); font-size: .8125rem; color: var(--ink-2); }
.crumbs li:not(:last-child)::after { content: '›'; margin-left: 8px; }
.crumbs a { color: var(--ink-2); }

/* ------------------------------------------------------------ lead */
.lead { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); padding-block: 36px 56px; }
.lead-main { padding-right: 44px; border-right: 1px solid var(--ink); min-width: 0; }
.lead-side { padding-left: 44px; min-width: 0; scroll-margin-top: 16px; overflow-x: clip; } /* the tilted stamp must not widen the page on phones */
.lead-h { font-size: clamp(2.1rem, 4.3vw, 3.7rem); line-height: 1.02; letter-spacing: -.025em; max-width: 17ch; }
.lead-kicker {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
  font-family: var(--grotesk); font-size: .9375rem; font-weight: 700; letter-spacing: 0; line-height: 1.2; color: var(--sekki);
}
.lead-kicker::after { content: ''; width: 44px; height: 3px; background: currentColor; }
.lead-deck { margin-top: 12px; font-style: italic; font-size: 1.375rem; color: var(--ink-2); }

.lead-figure { position: relative; isolation: isolate; overflow: hidden; margin-top: 28px; padding: 18px 0 16px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.guilloche { position: absolute; z-index: -1; right: -210px; top: 50%; width: 560px; height: 560px; transform: translateY(-50%); pointer-events: none; }
.figure { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.fig-lbl, .fig-cur { font-family: var(--grotesk); font-size: 1.125rem; font-weight: 700; }
.fig-lbl { color: var(--ink-2); }
.fig-num { font-size: clamp(4.25rem, 11.5vw, 9.75rem); font-weight: 500; letter-spacing: -.04em; line-height: .92; }
.fig-num--long { font-size: clamp(3rem, 7.6vw, 7rem); } /* crypto prices like 72 345,12 */
.fig-num--xlong { font-size: clamp(2.5rem, 5.8vw, 5.25rem); } /* sub-cent prices like 0,000005324 */
.fig-sep { color: var(--rule-dot); }
.fig-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-top: 10px; font-family: var(--grotesk); font-size: .875rem; color: var(--ink-2); }
.fig-meta .chg { font-size: .9375rem; }
.fig-meta--inv { display: block; margin-top: 2px; }
.brief { margin-top: 22px; font-size: 1.125rem; line-height: 1.6; max-width: 62ch; }
.dateline { font-family: var(--grotesk); font-weight: 800; font-size: .8125rem; text-transform: uppercase; letter-spacing: .03em; }

/* odometer (JS builds it; server HTML is plain text) */
.odo { display: inline-flex; line-height: 1; }
.odo-c, .odo-d { display: inline-block; height: 1em; line-height: 1; }
.odo-d { position: relative; overflow: hidden; }
.odo-w { visibility: hidden; }
.odo-s { position: absolute; inset: 0 0 auto; display: flex; flex-direction: column; align-items: center; transform: translateY(calc(var(--n) * -1em)); transition: transform 900ms var(--ease-pen) calc(var(--i, 0) * 40ms); }
.odo-s > span { height: 1em; }

/* ------------------------------------------------------------ muuntolomake */
.slip { position: relative; padding: 26px 22px 20px; background: var(--paper-2); border: 1px solid var(--ink); }
.slip::before {
  content: ''; position: absolute; left: -1px; right: -1px; top: -7px; height: 13px;
  background: radial-gradient(circle at 7px 6.5px, var(--paper) 3.4px, transparent 3.9px) 0 0 / 15px 13px repeat-x;
}
.slip-head { display: flex; align-items: baseline; gap: 12px; padding-bottom: 8px; border-bottom: 3px solid var(--ink); margin-bottom: 14px; }
.slip-title { font-size: 1.625rem; letter-spacing: -.02em; }
.slip-ref { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--ink); font-family: var(--grotesk); font-size: .6875rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.slip-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  grid-template-areas: 'amount amount amount' 'from swap to' 'result result result';
  border-top: 1px solid var(--ink); border-left: 1px solid var(--ink);
}
.box { min-width: 0; padding: 7px 12px 10px; background: var(--paper); border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.box:focus-within { outline: 2px solid var(--sekki); outline-offset: -3px; }
.box--amount { grid-area: amount; }
.box--from { grid-area: from; }
.box--to { grid-area: to; }
.box--result { grid-area: result; padding-bottom: 12px; }
.box-lbl { display: block; margin-bottom: 2px; font-family: var(--grotesk); font-size: .6875rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.slip-amount { width: 100%; min-width: 0; padding: 0; border: 0; border-radius: 0; background: none; font-family: var(--serif); font-size: 2.25rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.15; }
.slip-amount:focus { outline: none; }
.cur-select { position: relative; display: flex; align-items: baseline; gap: 8px; padding-right: 18px; min-width: 0; }
.cur-select::after { content: '▾'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-family: var(--grotesk); font-size: .875rem; pointer-events: none; }
.cur-code { font-family: var(--grotesk); font-size: 1.375rem; font-weight: 800; letter-spacing: .01em; }
.cur-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-family: var(--grotesk); font-size: .8125rem; color: var(--ink-2); }
.cur-select select { position: absolute; inset: -8px -12px -10px; width: calc(100% + 24px); opacity: 0; cursor: pointer; }
.cur-select select option { color: #16150F; background: #F1ECE1; }
.swap {
  grid-area: swap; display: grid; place-items: center; width: 48px; padding: 0;
  border: 0; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  background: var(--paper); color: var(--ink);
  transition: background var(--t-fast), color var(--t-fast);
}
.swap span { font-size: 1.375rem; line-height: 1; transition: transform 500ms var(--ease-pen); }
.swap:hover { background: var(--ink); color: var(--paper); }
.swap.is-turned span { transform: rotate(180deg); }
.slip-mid { margin-top: 2px; font-family: var(--grotesk); font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.slip-mid[hidden] { display: none; }
.slip-result { display: block; font-family: var(--serif); font-size: clamp(2.5rem, 4.2vw, 3.5rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; overflow: hidden; white-space: nowrap; }
.slip-line { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; margin: 10px 0 14px; }
.slip-rate { font-family: var(--grotesk); font-size: .8125rem; font-weight: 600; color: var(--ink-2); }
.slip-share { flex: none; padding: 0; border: 0; background: none; font-family: var(--grotesk); font-size: .8125rem; font-weight: 700; color: var(--sekki); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.slip-share::before { content: '↗ '; text-decoration: none; display: inline-block; margin-right: 3px; }
.slip-share:hover { text-decoration-thickness: 2px; }
.slip-share-status { margin: -8px 0 12px; font-family: var(--grotesk); font-size: .8125rem; font-weight: 600; color: var(--ink-2); overflow-wrap: anywhere; }
.slip-share-status:empty { display: none; }
.slip-margin { display: grid; gap: 6px; padding-top: 12px; border-top: 1px dashed var(--ink); font-family: var(--grotesk); font-size: .875rem; }
.slip-margin label { font-weight: 600; }
.slip-margin input[type='range'] { width: 100%; height: 26px; accent-color: var(--sekki); }
.slip-margin-out { font-family: var(--serif); font-size: 1rem; line-height: 1.45; }
.slip-margin-out strong { color: var(--down); font-weight: 600; }

.stamp { position: absolute; top: 12px; right: 18px; width: 150px; color: var(--sekki); transform: rotate(-7deg); opacity: .88; pointer-events: none; }
[data-theme='light'] .stamp { mix-blend-mode: multiply; }
.st-frame { fill: none; stroke: currentColor; stroke-width: 3.2; }
.st-frame--thin { stroke-width: 1.2; }
.stamp text { fill: currentColor; font-family: var(--grotesk); text-anchor: middle; font-weight: 800; }
.st-top { font-size: 14px; letter-spacing: 2.4px; }
.st-date { font-size: 27px; letter-spacing: 1px; }
.st-bot { font-size: 8.5px; letter-spacing: 2.2px; font-weight: 700; }
.js .stamp { animation: stamp 440ms var(--ease-out) 750ms both; }
@keyframes stamp {
  0% { opacity: 0; transform: scale(1.55) rotate(-15deg); }
  65% { opacity: .95; transform: scale(.95) rotate(-6deg); }
  100% { opacity: .88; transform: scale(1) rotate(-7deg); }
}

/* ------------------------------------------------------------ sections */
.sec { padding-block: 44px 20px; }
.sec-head { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 44px; padding-top: 16px; margin-bottom: 26px; }
.sec-head::before, .sec-head::after { content: ''; position: absolute; left: 0; right: 0; background: var(--ink); transform-origin: left; }
.sec-head::before { top: 0; height: 3px; }
.sec-head::after { top: 6px; height: 1px; }
.js .sec-head::before, .js .sec-head::after { transform: scaleX(0); transition: transform var(--t-slow) var(--ease-pen); }
.js .sec-head::after { transition-delay: 120ms; }
.js .sec-head.is-in::before, .js .sec-head.is-in::after { transform: none; }
.kicker { grid-column: 1; font-family: var(--grotesk); font-size: .9375rem; font-weight: 700; margin-bottom: 4px; }
.sec-head h2 { grid-column: 1; font-size: clamp(1.7rem, 2.8vw, 2.4rem); }
.sec-note { grid-column: 2; grid-row: 1 / span 2; align-self: end; padding-left: 16px; border-left: 1px solid var(--rule-soft); font-family: var(--grotesk); font-size: .875rem; color: var(--ink-2); }

/* small multiples */
.multiples { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--rule-soft); border-block: 1px solid var(--ink); }
.multiples li { background: var(--paper); }
.multiples a {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: 'pair chg' 'name name' 'rate rate' 'spark spark' 'range range';
  padding: 14px 18px 12px; height: 100%; color: var(--ink); text-decoration: none; transition: background var(--t-fast);
}
.multiples a:hover { background: var(--paper-2); }
.mu-pair { grid-area: pair; font-family: var(--grotesk); font-size: .875rem; font-weight: 800; }
.multiples .chg { grid-area: chg; }
.mu-name { grid-area: name; font-family: var(--grotesk); font-size: .8125rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu-rate { grid-area: rate; margin-top: 4px; font-size: 2.25rem; font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.multiples .spark { grid-area: spark; width: 100%; height: 46px; margin-top: 8px; }
.mu-rate small, .l-rate small { font-family: var(--grotesk); font-size: .45em; font-weight: 700; color: var(--ink-2); letter-spacing: 0; }
.l-rate small { font-size: .75em; }
.mu-range { grid-area: range; display: flex; justify-content: space-between; margin-top: 4px; font-family: var(--grotesk); font-size: .75rem; color: var(--ink-2); }

/* sparklines */
.spark { overflow: visible; }
.spark-line { fill: none; stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark-dot { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-dot--o { stroke: var(--ink); stroke-width: 6.5; }
.spark-dot--i { stroke: var(--paper); stroke-width: 3.5; }
.multiples a:hover .spark-dot--i, .rates-table tr:hover .spark-dot--i { stroke: var(--paper-2); }
.spark-dot--last { stroke: var(--sekki); stroke-width: 7; }
/* Dash > 1: with non-scaling-stroke the dash is measured in screen space, so it must outlast a stretched path. */
.js .spark-line { stroke-dasharray: 4; stroke-dashoffset: 4; transition: stroke-dashoffset 1.3s var(--ease-pen); }
.js .spark-dot { opacity: 0; transition: opacity 400ms var(--ease-out) 1.1s; }
.js .is-in .spark-line { stroke-dashoffset: 0; }
.js .is-in .spark-dot { opacity: 1; }

/* listing with dotted leaders */
.listing-tools { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px; margin-bottom: 14px; }
.find { display: flex; align-items: baseline; gap: 10px; flex: 1; max-width: 460px; font-family: var(--grotesk); }
.find-lbl { font-weight: 800; font-size: .875rem; }
.find input { flex: 1; min-width: 0; padding: 4px 0; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: none; font-family: var(--serif); font-size: 1.0625rem; font-style: italic; }
.find input:focus { outline: none; border-bottom: 2px solid var(--sekki); }
.more { font-family: var(--grotesk); font-size: .875rem; font-weight: 700; text-decoration: none; }
.more:hover { text-decoration: underline; }
.listing { list-style: none; padding: 6px 0 0; columns: 3; column-gap: 40px; column-rule: 1px solid var(--rule-soft); border-top: 1px solid var(--ink); }
.listing li { break-inside: avoid; }
.listing a { display: flex; align-items: baseline; gap: 6px; padding: 6px 0; color: var(--ink); text-decoration: none; font-family: var(--grotesk); font-size: .9375rem; }
.l-name { flex: none; max-width: 62%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.l-name abbr { font-size: .6875rem; font-weight: 700; color: var(--ink-2); }
.listing a:hover .l-name { text-decoration: underline; text-underline-offset: 3px; }
.l-dots { flex: 1; min-width: 10px; border-bottom: 2px dotted var(--rule-dot); transform: translateY(-4px); }
.l-rate { font-family: var(--serif); font-size: 1.0625rem; font-weight: 500; }
.listing .chg { width: 4.7em; justify-content: flex-end; font-size: .75rem; }
.listing-foot { margin-top: 14px; padding-top: 8px; border-top: 1px solid var(--rule-soft); }
.table-empty { padding: 20px 0; font-style: italic; color: var(--ink-2); }

/* ------------------------------------------------------------ chart */
.chart { margin: 0; }
.chart-controls { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 24px; }
.chart-sentence { font-size: 1.5rem; line-height: 1.3; }
.chart-sentence strong { font-weight: 600; }
.inline-select { position: relative; display: inline-block; color: var(--sekki); border-bottom: 2px solid currentColor; }
.inline-select::after { content: '▾'; position: absolute; right: 0; bottom: .2em; font-family: var(--grotesk); font-size: .6em; pointer-events: none; }
.inline-select select { appearance: none; -webkit-appearance: none; padding: 0 1.05em 0 0; border: 0; border-radius: 0; background: none; font-family: var(--serif); font-size: inherit; font-weight: 600; color: inherit; cursor: pointer; max-width: 80vw; }
.inline-select select:focus { outline: none; }
.inline-select:focus-within { outline: 2px solid var(--sekki); outline-offset: 3px; }
.inline-select option { color: #16150F; background: #F1ECE1; font-family: var(--grotesk); font-size: 1rem; }
.tabs { position: relative; display: flex; gap: 20px; }
.tabs button { padding: 6px 0 8px; border: 0; background: none; font-family: var(--grotesk); font-size: .9375rem; font-weight: 700; color: var(--ink-2); transition: color var(--t-med); }
.tabs button[aria-pressed='true'], .tabs button:hover { color: var(--ink); }
.tabs-ink { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--ink); transition: transform var(--t-med) var(--ease-out), width var(--t-med) var(--ease-out); }
.chart-compare { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; font-family: var(--grotesk); font-size: .9375rem; font-weight: 700; }
.inline-select--sm select { font-family: var(--grotesk); font-size: .9375rem; font-weight: 700; }
.chart-legend { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; margin-top: 8px; font-family: var(--grotesk); font-size: .875rem; font-weight: 700; }
.chart-legend .chg { margin-left: 4px; }
.legend-diff { font-weight: 600; color: var(--ink-2); }
.key { display: inline-block; width: 22px; height: 0; margin-right: 7px; vertical-align: middle; border-top: 2.5px solid var(--ink); }
.key--cmp { border-top-color: var(--sekki); }
.chart-tip .key { width: 14px; margin-right: 5px; border-top-color: var(--paper); }
.chart-tip .key--cmp { border-top-style: dashed; }
.tip-row { display: block; font-family: var(--serif); font-size: 1rem; font-variant-numeric: tabular-nums; }
.tip-row b { font-weight: 600; }
.chart-stats { display: flex; flex-wrap: wrap; margin: 14px 0 6px; border-block: 1px solid var(--ink); }
.chart-stats > div { padding: 8px 28px 8px 0; margin-right: 28px; border-right: 1px solid var(--rule-soft); }
.chart-stats > div:last-child { border-right: 0; }
.chart-stats dt { font-family: var(--grotesk); font-size: .75rem; font-weight: 700; color: var(--ink-2); }
.chart-stats dd { font-size: 1.625rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.2; }
.chart-stats dd.chg--up { color: var(--up); }
.chart-stats dd.chg--down { color: var(--down); }
.chart-canvas { position: relative; height: 380px; touch-action: pan-y; }
.chart-canvas:focus-visible { outline-offset: 6px; }
.chart-canvas > svg { width: 100%; height: 100%; overflow: visible; }
.hatch-line { stroke: var(--ink); stroke-width: 1; opacity: .3; }
.c-area { stroke: none; }
.c-line { fill: none; stroke: var(--ink); stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.chart-static .c-line { vector-effect: non-scaling-stroke; }
.c-grid line { stroke: var(--rule-soft); }
.c-base { stroke: var(--ink); stroke-width: 1; }
.c-axis text { fill: var(--ink-2); font-family: var(--grotesk); font-size: 12px; }
.c-last { fill: var(--sekki); }
.c-last--ink { fill: var(--ink); }
.c-line--cmp { stroke: var(--sekki); }
.c-zero { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 3; opacity: .55; }
.c-dot--ink { stroke: var(--ink); }
.c-cross { stroke: var(--sekki); stroke-width: 1; opacity: 0; transition: opacity var(--t-fast); }
.c-dot { fill: var(--paper); stroke: var(--sekki); stroke-width: 2.5; opacity: 0; transition: opacity var(--t-fast); }
.chart-canvas.is-hover .c-cross, .chart-canvas.is-hover .c-dot { opacity: 1; }
.chart-live .c-line { transition: stroke-dashoffset 1.3s var(--ease-pen); }
.chart-live .c-area { clip-path: inset(0 0 0 0); transition: clip-path 1.3s var(--ease-pen) 120ms; }
.chart-live.is-drawing .c-area { clip-path: inset(0 100% 0 0); }
.chart-tip {
  position: absolute; top: 0; left: 0; z-index: 2; pointer-events: none;
  padding: 6px 10px; background: var(--ink); color: var(--paper);
  font-family: var(--grotesk); font-size: .75rem; line-height: 1.35; white-space: nowrap;
  transform: translate(-50%, calc(-100% - 14px));
}
.chart-tip strong { display: block; font-family: var(--serif); font-size: 1.125rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.chart-tip em { font-style: normal; font-weight: 700; }
.is-loading .chart-canvas > svg { opacity: .3; transition: opacity var(--t-med); }
.chart-note { margin-top: 8px; font-family: var(--grotesk); font-size: .8125rem; color: var(--ink-2); }
.chart-error { position: absolute; inset: 40% 0 auto; text-align: center; font-style: italic; color: var(--down); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 22px; border-block: 1px solid var(--ink); }
.kpis > div { padding: 10px 16px 12px 0; }
.kpis > div + div { padding-left: 16px; border-left: 1px solid var(--rule-soft); }
.kpis dt { font-family: var(--grotesk); font-size: .75rem; font-weight: 700; color: var(--ink-2); }
.kpis dd { font-size: 1.5rem; font-weight: 500; letter-spacing: -.02em; }
.kpis small { font-family: var(--grotesk); font-size: .75rem; color: var(--ink-2); letter-spacing: 0; }

/* coin page: about + facts, a printed fact box with dotted leaders */
.coin-info { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 44px; }
.coin-about { font-size: 1.25rem; line-height: 1.55; max-width: 52ch; }
.coin-about p + p { margin-top: 12px; font-size: 1.0625rem; color: var(--ink-2); }
.facts { border-top: 3px solid var(--ink); }
.facts > div { display: flex; align-items: baseline; gap: 12px; padding: 7px 0; border-bottom: 1px dotted var(--rule-dot); }
.facts dt { flex: 1; font-family: var(--grotesk); font-size: .875rem; font-weight: 700; }
.facts dd { font-size: 1.125rem; font-weight: 500; text-align: right; }
.facts small { display: block; font-family: var(--grotesk); font-size: .75rem; color: var(--ink-2); }

/* ------------------------------------------------------------ explainer */
.explainer { margin: 0 0 28px; }
.explainer svg { width: 100%; height: auto; overflow: visible; }
.ex-narrow { display: none; }
.ex-lbl.ex-lbl--sub { font-weight: 600; }
.ex-lbl.ex-lbl--start { text-anchor: start; }
.ex-lbl.ex-lbl--end { text-anchor: end; }
.ex-axisline { stroke: var(--ink); stroke-width: 1.5; }
.ex-tick { stroke: var(--ink); }
.ex-axis { fill: var(--ink-2); font-family: var(--grotesk); font-size: 12px; text-anchor: middle; }
.ex-mark line { stroke: var(--ink); stroke-width: 1.2; }
.ex-mark--mid line { stroke: var(--sekki); stroke-width: 2.5; }
.ex-lbl { fill: var(--ink); font-family: var(--grotesk); font-size: 15px; font-weight: 700; text-anchor: middle; }
.ex-val { fill: var(--sekki); font-family: var(--serif); font-size: 34px; font-weight: 500; }
.ex-band-lbl { fill: var(--ink); font-family: var(--serif); font-style: italic; font-size: 16px; text-anchor: middle; paint-order: stroke; stroke: var(--paper); stroke-width: 6px; }
.explainer figcaption { margin-top: 6px; max-width: 78ch; font-family: var(--grotesk); font-size: .875rem; color: var(--ink-2); }
.js .ex-band { transform-box: fill-box; transform: scaleX(0); transition: transform 1s var(--ease-pen) 250ms; }
.ex-band--l { transform-origin: right center; }
.ex-band--r { transform-origin: left center; }
.js .ex-mark--l, .js .ex-mark--r { opacity: 0; transition: transform 1s var(--ease-pen) 250ms, opacity 400ms var(--ease-out) 250ms; }
.js .ex-mark--l { transform: translateX(260px); }
.js .ex-mark--r { transform: translateX(-260px); }
.js .ex-narrow .ex-mark--l { transform: translateX(96px); }
.js .ex-narrow .ex-mark--r { transform: translateX(-96px); }
.js .ex-band-lbl { opacity: 0; transition: opacity 500ms var(--ease-out) 1.1s; }
.js .explainer.is-in .ex-band, .js .explainer.is-in .ex-mark--l, .js .explainer.is-in .ex-mark--r { transform: none; opacity: 1; }
.js .explainer.is-in .ex-band-lbl { opacity: 1; }

.notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.notes > div { padding: 14px 24px 8px 0; }
.notes > div + div { padding-left: 24px; border-left: 1px solid var(--rule-soft); }
.notes h3 { font-size: 1.25rem; margin-bottom: 6px; }
.notes p { font-size: 1rem; color: var(--ink-2); }

/* ------------------------------------------------------------ Q&A */
.qa { columns: 2; column-gap: 48px; column-rule: 1px solid var(--rule-soft); }
.qa-item { break-inside: avoid; padding-bottom: 22px; }
.qa-item h3 { font-family: var(--grotesk); font-size: 1rem; font-weight: 800; letter-spacing: -.005em; line-height: 1.3; margin-bottom: 4px; }
.qa-item p { font-size: 1.0625rem; color: var(--ink-2); }

/* ------------------------------------------------------------ tables */
.conv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px; }
.conv { width: 100%; border-collapse: collapse; }
.conv caption { text-align: left; padding-bottom: 6px; border-bottom: 3px solid var(--ink); font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
.conv th, .conv td { padding: 6px 0; border-bottom: 1px dotted var(--rule-dot); }
.conv thead th { font-family: var(--grotesk); font-size: .75rem; font-weight: 800; text-align: left; border-bottom: 1px solid var(--ink); }
.conv thead th.num { text-align: right; }
.conv tbody th { text-align: left; font-family: var(--grotesk); font-size: .9375rem; font-weight: 600; }
.conv td { text-align: right; font-size: 1.125rem; font-weight: 500; }

/* position: the sr-only header labels inside are absolute; without a containing block here they escape the scroll box and widen the page. */
.table-scroll { position: relative; overflow-x: auto; }
.rates-table { width: 100%; border-collapse: collapse; }
.rates-table th, .rates-table td { padding: 8px 14px 8px 0; text-align: left; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
.rates-table thead th { padding-block: 8px; border-top: 1px solid var(--ink); border-bottom: 3px solid var(--ink); font-family: var(--grotesk); font-size: .75rem; font-weight: 800; }
.rates-table thead button { display: inline-flex; gap: 4px; padding: 0; border: 0; background: none; font-family: var(--grotesk); font-size: .75rem; font-weight: 800; }
.rates-table thead button::after { content: '↕'; color: var(--ink-2); }
.rates-table thead th[aria-sort='ascending'] button::after { content: '↑'; color: var(--sekki); }
.rates-table thead th[aria-sort='descending'] button::after { content: '↓'; color: var(--sekki); }
.rates-table .num { text-align: right; }
.rates-table thead .num button { flex-direction: row-reverse; }
.rates-table tbody th { font-family: var(--grotesk); font-weight: 600; font-size: .9375rem; }
.rates-table tbody th a { color: var(--ink); text-decoration: none; }
.rates-table tbody th a:hover { text-decoration: underline; }
.t-rank { display: inline-block; min-width: 1.4em; margin-right: .75em; text-align: right; font-size: .75rem; font-weight: 700; font-variant-numeric: tabular-nums lining-nums; color: var(--ink-2); }
.t-code { margin-left: 4px; font-size: .6875rem; font-weight: 700; color: var(--ink-2); }
.rates-table td.num { font-size: 1.125rem; font-weight: 500; }
.rates-table td.num .chg { font-size: .8125rem; }
.rates-table tbody tr:hover { background: var(--paper-2); }
.t-spark .spark { width: 120px; height: 28px; margin-left: auto; }

/* ------------------------------------------------------------ pages & prose */
.page-head { padding-block: 28px 8px; } /* block only: .wrap supplies the side gutter */
.page-head h1 { font-size: clamp(2.4rem, 5.4vw, 4.4rem); letter-spacing: -.03em; max-width: 20ch; }
.page-head .brief, .standfirst { margin-top: 14px; }
.standfirst { font-style: italic; font-size: 1.375rem; line-height: 1.45; color: var(--ink-2); max-width: 56ch; padding-bottom: 20px; border-bottom: 1px solid var(--ink); }
.sec--flush { padding-top: 20px; }
.article { padding-bottom: 40px; }
.prose { max-width: 68ch; margin-top: 28px; font-size: 1.125rem; line-height: 1.65; }
.prose h2 { font-size: 1.5rem; margin: 36px 0 10px; }
.prose p, .prose ul { margin-bottom: 14px; }
.prose ul { padding-left: 1.1em; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--sekki); }
.dropcap::first-letter { float: left; margin: 6px 10px 0 0; font-size: 4.35em; line-height: .78; font-weight: 600; color: var(--sekki); }

.page-head--404 { position: relative; min-height: 50vh; padding-top: 64px; }
.void {
  position: absolute; right: 4%; top: 70px; padding: 6px 18px;
  border: 5px double var(--down); color: var(--down); transform: rotate(-12deg);
  font-family: var(--grotesk); font-size: clamp(1.5rem, 4vw, 2.75rem); font-weight: 900; letter-spacing: .12em; text-transform: uppercase; opacity: .8;
  animation: void-in 440ms var(--ease-out) 400ms both;
}
@keyframes void-in { 0% { opacity: 0; transform: scale(1.5) rotate(-20deg); } 100% { opacity: .8; transform: scale(1) rotate(-12deg); } }
.links-row { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 20px; font-family: var(--grotesk); font-weight: 700; }

/* ------------------------------------------------------------ kurssihistoria */
/* Sub-views of a currency: real links styled like the range tabs, an ink underline on the current one. */
.pagetabs ul { display: flex; gap: 24px; list-style: none; padding: 10px 0 0; border-bottom: 1px solid var(--rule-soft); overflow-x: auto; scrollbar-width: none; }
.pagetabs a { display: block; padding: 6px 0 8px; font-family: var(--grotesk); font-size: .9375rem; font-weight: 700; color: var(--ink-2); text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; transition: color var(--t-fast); }
.pagetabs a:hover { color: var(--ink); }
.pagetabs a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); }

.year-note { margin-top: 12px; max-width: 62ch; padding-left: 14px; border-left: 3px solid var(--sekki); font-family: var(--grotesk); font-size: .9375rem; color: var(--ink-2); }
.page-head .kpis { margin-top: 28px; }

.years { display: flex; flex-wrap: wrap; gap: 2px 14px; list-style: none; padding: 0; font-family: var(--grotesk); font-size: .9375rem; font-weight: 600; font-variant-numeric: tabular-nums lining-nums; }
.years a { text-decoration: none; }
.years a:hover { text-decoration: underline; }
.years a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--sekki); text-decoration-thickness: 2px; text-underline-offset: 5px; }
.years-block { margin-top: 22px; padding-top: 10px; border-top: 1px solid var(--rule-soft); }
.years-h { margin-bottom: 6px; font-family: var(--grotesk); font-size: .875rem; font-weight: 800; letter-spacing: 0; }
.year-step { display: flex; justify-content: space-between; margin-bottom: 14px; font-size: 1.5rem; font-weight: 600; }
.year-step a { text-decoration: none; }
.year-step a:hover { text-decoration: underline; }
#vuodet-h + .sec-note, .years + .links-row { margin-top: 18px; }

.rates-table tfoot th, .rates-table tfoot td { padding-block: 10px; border-top: 3px solid var(--ink); border-bottom: 0; font-weight: 700; }
.rates-table tfoot th { font-family: var(--grotesk); font-size: .9375rem; }

.daily { border-top: 1px solid var(--ink); }
.daily summary { padding: 12px 0; font-family: var(--grotesk); font-weight: 700; color: var(--sekki); cursor: pointer; }
.daily summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.rates-table--daily th, .rates-table--daily td { padding-block: 5px; }
.rates-table--daily tbody th { font-weight: 500; font-size: .875rem; }
.rates-table--daily td { text-align: right; font-size: 1rem; font-variant-numeric: tabular-nums lining-nums; }
.rates-table--daily td:last-child { font-family: var(--grotesk); font-size: .8125rem; font-weight: 700; white-space: nowrap; }
.rates-table--daily .up { color: var(--up); }
.rates-table--daily .down { color: var(--down); }
.rates-table--daily .flat { color: var(--ink-2); }
.rates-table--daily .up::before { content: '▲ '; font-size: .7em; }
.rates-table--daily .down::before { content: '▼ '; font-size: .7em; }
.rates-table--daily .flat::before { content: '■ '; font-size: .7em; }
.rates-table--daily .mo-row th { padding-top: 18px; border-bottom: 1px solid var(--ink); font-family: var(--serif); font-size: 1.25rem; font-weight: 600; letter-spacing: -.01em; }
.rates-table--daily tbody tr:hover { background: none; }
.download { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 16px; font-family: var(--grotesk); font-size: .875rem; color: var(--ink-2); }
.download a { font-weight: 700; }
.download a::before { content: '↓ '; }

/* Kurssikysely: the bank form beside the answer. The form needs JS; without it the printed answer stands alone. */
.lookup { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); padding-block: 28px 40px; overflow-x: clip; }
.slip--lookup { align-self: start; }
html:not(.js) .slip--lookup { display: none; }
html:not(.js) .lookup { grid-template-columns: 1fr; }
.lk-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.lk-date { width: 100%; min-width: 0; padding: 0; border: 0; border-radius: 0; background: none; font-family: var(--serif); font-size: 1.625rem; font-weight: 500; line-height: 1.2; color-scheme: inherit; }
.lk-date:focus { outline: none; }
.lk-result { min-width: 0; padding-left: 44px; }
html.js .lk-result { border-left: 1px solid var(--ink); margin-left: 44px; }
.lk-when { padding-bottom: 8px; border-bottom: 1px solid var(--ink); font-family: var(--grotesk); font-size: 1rem; font-weight: 700; }
.lk-result .figure { margin-top: 14px; }
.lk-result .fig-num { font-size: clamp(3.5rem, 8vw, 7rem); }
.lk-note { margin-top: 14px; max-width: 52ch; font-style: italic; font-size: 1.125rem; color: var(--ink-2); }
.lk-note:empty { display: none; }
.lk-links { margin-top: 14px; font-family: var(--grotesk); font-weight: 700; }
.lk-links a { text-decoration: none; }
.lk-links a:hover { text-decoration: underline; }

/* Archive index: currency name, then its years. */
.archive { list-style: none; padding: 0; border-top: 1px solid var(--ink); }
.archive > li { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr); gap: 4px 24px; padding: 8px 0; border-bottom: 1px dotted var(--rule-dot); }
.ar-name { font-family: var(--grotesk); font-size: .9375rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.ar-name:hover { text-decoration: underline; }
.ar-name abbr { font-size: .6875rem; color: var(--ink-2); }
.archive .years { font-size: .875rem; font-weight: 500; gap: 2px 10px; }
.years-wrap { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; min-width: 0; }
.years-more[open] { flex-basis: 100%; }
.years-more summary { font-family: var(--grotesk); font-size: .875rem; font-weight: 700; color: var(--sekki); cursor: pointer; list-style: none; }
.years-more summary::-webkit-details-marker { display: none; }
.years-more summary::after { content: ' ▾'; font-size: .8em; }
.years-more[open] summary::after { content: ' ▴'; }
.years-more summary:hover { text-decoration: underline; text-underline-offset: 3px; }
.years-more > .years { margin-top: 2px; }

/* ------------------------------------------------------------ keskikurssit */
/* Bars are hatched like the chart area: diagonal ink lines are the only fill texture. */
.ybars, .bars-list { --hatch: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--ink) 40%, transparent) 0 1px, transparent 1px 5px); }

/* Every currency × 12 months: scrolls sideways, the currency column stays put. */
.rates-table--avg th, .rates-table--avg td { padding-right: 10px; white-space: nowrap; }
.rates-table--avg td.num { font-size: .9375rem; }
.rates-table--avg td.t-year { font-weight: 700; }
.rates-table--avg .t-sep { padding-right: 14px; border-right: 1px solid var(--rule-soft); }
.rates-table--avg .t-sep--l { padding-left: 14px; border-left: 1px solid var(--rule-soft); }
.rates-table--avg tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--paper); }
.rates-table--avg tbody tr:hover > :first-child { background: var(--paper-2); }
.rates-table--avg tbody th a:hover .t-name { text-decoration: underline; }
.rates-table--avg tbody th a { text-decoration: none; }

/* Diverging bars round a zero line: right = the euro bought more of the currency than the year before. */
.bars { margin: 0; }
.bars-list { list-style: none; padding: 0; border-top: 1px solid var(--ink); }
.bars-list a { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr) 6.5em; align-items: center; gap: 16px; padding: 4px 0; border-bottom: 1px dotted var(--rule-dot); color: var(--ink); text-decoration: none; font-family: var(--grotesk); font-size: .9375rem; font-weight: 600; }
.bars-list a:hover { background: var(--paper-2); }
.b-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.b-name abbr { font-size: .6875rem; font-weight: 700; color: var(--ink-2); }
.b-track { position: relative; height: 14px; }
.b-track::before { content: ''; position: absolute; left: 50%; top: -6px; bottom: -6px; border-left: 1px solid var(--ink); }
.b-bar { position: absolute; top: 0; bottom: 0; border: 1px solid var(--ink); background: var(--hatch); }
.b-track--pos .b-bar { left: 50%; }
.b-track--neg .b-bar { right: 50%; }
.bars-list .chg { justify-content: flex-end; }
.bars .chart-note { margin-top: 10px; }

/* Yearly averages as columns; the hovered or focused year shows its figure. */
.ychart { margin: 0; }
.ybars { display: flex; gap: 3px; height: 280px; margin: 22px 0 30px; padding: 0; list-style: none; border-bottom: 1px solid var(--ink); }
.yb { position: relative; flex: 1; min-width: 0; }
.yb a { position: absolute; inset: 0; display: block; color: var(--ink); text-decoration: none; }
.yb-bar { position: absolute; left: 0; right: 0; bottom: 0; height: var(--h); border: 1px solid var(--ink); border-bottom: 0; background: var(--hatch); transition: background-color var(--t-fast); }
.yb.is-mark .yb-bar { border-width: 2px 2px 0; }
.yb.is-partial .yb-bar { border-style: dashed; }
.yb a:hover .yb-bar, .yb a:focus-visible .yb-bar { background-color: color-mix(in srgb, var(--sekki) 35%, transparent); border-color: var(--sekki); }
.yb a:focus-visible { outline: none; }
.yb-val { position: absolute; bottom: calc(var(--h) + 8px); left: 50%; z-index: 2; transform: translateX(-50%); padding: 2px 6px; border: 1px solid var(--ink); background: var(--paper); font-family: var(--grotesk); font-size: .8125rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; opacity: 0; pointer-events: none; transition: opacity var(--t-fast); }
.yb:nth-child(-n+4) .yb-val { left: 0; transform: none; }
.yb:nth-last-child(-n+4) .yb-val { left: auto; right: 0; transform: none; }
.yb a:hover .yb-val, .yb a:focus-visible .yb-val { opacity: 1; }
.yb-y { position: absolute; top: 100%; left: 50%; margin-top: 6px; transform: translateX(-50%); font-family: var(--grotesk); font-size: .75rem; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums lining-nums; }
.chart-stats small { font-family: var(--grotesk); font-size: .75rem; color: var(--ink-2); letter-spacing: 0; }

/* ------------------------------------------------------------ colophon */
.colophon { position: relative; margin-top: 56px; padding: 34px 0 28px; font-family: var(--grotesk); font-size: .875rem; }
.colophon::before, .colophon::after { content: ''; position: absolute; left: 0; right: 0; background: var(--ink); }
.colophon::before { top: 0; height: 3px; }
.colophon::after { top: 6px; height: 1px; }
.col-grid { display: grid; grid-template-columns: 1.3fr 1.6fr 1fr 1.4fr; gap: 32px; padding-bottom: 24px; }
.col-grid > * + * { padding-left: 24px; border-left: 1px solid var(--rule-soft); }
.wordmark--sm { font-size: 1.5rem; margin-bottom: 12px; }
.col-about p { font-family: var(--serif); font-size: 1rem; color: var(--ink-2); max-width: 32ch; }
.col-h { font-family: var(--grotesk); font-size: .875rem; font-weight: 800; letter-spacing: 0; margin-bottom: 10px; }
.col-list { list-style: none; padding: 0; columns: 2; column-gap: 20px; }
.col-list--1 { columns: 1; }
.col-list li { margin-bottom: 5px; break-inside: avoid; }
.colophon a { color: var(--ink); text-decoration: none; }
.colophon a:hover { text-decoration: underline; }
.col-colophon dl > div { display: grid; grid-template-columns: 7.5em 1fr; gap: 8px; padding: 4px 0; border-bottom: 1px dotted var(--rule-dot); }
.col-colophon dt { font-weight: 700; }
.col-colophon dd { font-family: var(--serif); font-size: .9375rem; color: var(--ink-2); }
.col-legal { padding-top: 12px; border-top: 1px solid var(--ink); font-size: .8125rem; color: var(--ink-2); }

/* ------------------------------------------------------------ matkarahat */
.rates-table--fees th small, .rates-table--fees td small { display: block; margin-top: 2px; font-family: var(--grotesk); font-size: .75rem; font-weight: 400; color: var(--ink-2); }
.rates-table--fees { min-width: 860px; } /* scrolls sideways on phones rather than crushing the columns */
.rates-table--fees td.num { font-size: 1rem; white-space: nowrap; }
.fee-fx { max-width: 24ch; font-size: 1.0625rem; }
.rates-table--fees .fee-atm, .rates-table--fees .fee-src { font-family: var(--grotesk); font-size: .875rem; max-width: 26ch; }
.fee-try {
  display: inline-block; padding: 4px 10px; border: 1px solid var(--sekki);
  font-family: var(--grotesk); font-size: .8125rem; font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: background var(--t-fast), color var(--t-fast);
}
.fee-try:hover { background: var(--sekki); color: var(--paper); }
.fee-foot { max-width: 72ch; margin-top: 12px; font-family: var(--grotesk); font-size: .875rem; color: var(--ink-2); }

.versus { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.versus > .table-scroll { padding-right: 32px; border-right: 1px solid var(--rule-soft); }
.rates-table--versus td { font-family: var(--grotesk); font-size: .9375rem; }
.rates-table--versus td.num { text-align: left; font-family: var(--serif); font-size: 1.125rem; }
.verdict { padding-left: 32px; }
.verdict h3 { font-size: 1.5rem; margin-bottom: 8px; }
.verdict p + p { margin-top: 10px; }
.verdict p { color: var(--ink-2); }

/* A classified ad: framed and labelled, so it never reads as editorial copy. */
.promo { max-width: 760px; margin-top: 36px; padding: 18px 24px 16px; border: 3px double var(--ink); background: var(--paper-2); }
.promo-tag { font-family: var(--grotesk); font-size: .75rem; font-weight: 800; color: var(--ink-2); }
.promo h3 { font-size: 1.5rem; margin: 2px 0 8px; }
.promo ul { padding-left: 1.1em; }
.promo li { margin-bottom: 4px; }
.promo li::marker { color: var(--sekki); }
.promo-cta { margin-top: 12px; font-family: var(--grotesk); font-size: 1.0625rem; font-weight: 800; }
.promo-note { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--rule-soft); font-family: var(--grotesk); font-size: .75rem; color: var(--ink-2); }

/* ------------------------------------------------------------ upotukset: frames on other sites + the generator */
html[data-embed] { overflow-x: hidden; } /* the tilted stamp must not make the frame scroll sideways */
.embed { padding: 8px 1px 1px; } /* room for the perforated edge and the frame hairlines */
.embed .slip { padding: 22px 16px 14px; }
.embed .slip-result { font-size: 2.5rem; }
.embed .slip-line { margin-bottom: 0; }
.embed .stamp { width: 112px; top: 14px; right: 12px; }
.embed-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--ink); font-family: var(--grotesk); font-size: .75rem; font-weight: 600; color: var(--ink-2); }
.wordmark--xs { font-size: 1.0625rem; }
.ebox { padding: 12px 16px 12px; border: 1px solid var(--ink); }
.ebox-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 6px; border-bottom: 3px solid var(--ink); font-size: 1.375rem; }
.ebox-h span { font-family: var(--grotesk); font-size: .75rem; font-weight: 700; letter-spacing: 0; color: var(--ink-2); }
.listing--embed { columns: 1; padding-top: 0; border-top: 0; }
.listing--embed li + li { border-top: 1px dotted var(--rule-soft); }
.listing--embed .l-name { max-width: 58%; }

.eg { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); overflow-x: clip; }
.eg-form { align-self: start; }
.eg-out { min-width: 0; margin-left: 44px; padding-left: 44px; border-left: 1px solid var(--ink); }
html:not(.js) .eg-form { display: none; } /* the printed default code and preview stand alone */
html:not(.js) .eg { grid-template-columns: 1fr; }
html:not(.js) .eg-out { margin-left: 0; padding-left: 0; border-left: 0; }
.eg-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.eg-grid .box--wide { grid-column: 1 / -1; }
.eg-grid fieldset { min-width: 0; margin: 0; border: 0; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.eg-grid legend { float: left; width: 100%; padding: 0; }
.eg-grid [hidden] { display: none; }
.eg-input { width: 100%; min-width: 0; padding: 2px 0; border: 0; border-radius: 0; background: none; font-family: var(--grotesk); font-size: 1.125rem; font-weight: 700; }
.eg-input:focus { outline: none; } /* the box draws the focus ring */
.eg-input option { color: #16150F; background: #F1ECE1; font-weight: 400; }
.eg-opts { clear: both; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.eg-opt { display: inline-flex; align-items: center; gap: 8px; padding: 3px 0; font-family: var(--grotesk); font-size: .9375rem; font-weight: 600; cursor: pointer; }
.eg-opt input { margin: 0; accent-color: var(--sekki); }
.eg-opt:has(input:disabled) { color: var(--ink-2); cursor: default; }
.eg-checks { clear: both; columns: 2; column-gap: 18px; }
.eg-checks .eg-opt { display: flex; min-width: 0; padding: 2px 0; break-inside: avoid; }
.eg-checks b { flex: none; font-weight: 800; }
.eg-nm { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .8125rem; font-weight: 400; color: var(--ink-2); }
.eg-h { margin-bottom: 8px; font-family: var(--grotesk); font-size: .875rem; font-weight: 800; letter-spacing: 0; }
.eg-stage { display: grid; justify-items: center; margin-bottom: 24px; padding: 28px 16px; background: var(--paper-2); border-block: 1px solid var(--ink); }
.eg-stage iframe { display: block; width: 100%; max-width: 420px; border: 0; }
.eg-code { display: block; width: 100%; padding: 10px 12px; border: 1px solid var(--ink); border-radius: 0; background: var(--paper-2); font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: .8125rem; line-height: 1.5; resize: vertical; }
.eg-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-top: 12px; font-family: var(--grotesk); font-size: .875rem; font-weight: 600; color: var(--ink-2); }
.eg-copy {
  padding: 7px 16px; border: 1px solid var(--sekki); background: none; color: var(--sekki);
  font-family: var(--grotesk); font-size: .9375rem; font-weight: 700;
  transition: background var(--t-fast), color var(--t-fast);
}
.eg-copy:hover { background: var(--sekki); color: var(--paper); }
.eg-api { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 44px; }
.eg-api .prose { margin-top: 0; }
.prose code, .eg-json { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; }
.prose code { padding: 0 .25em; font-size: .85em; background: var(--paper-2); overflow-wrap: anywhere; }
.eg-json { align-self: start; overflow-x: auto; padding: 14px 16px; background: var(--paper-2); border-block: 1px solid var(--ink); font-size: .8125rem; line-height: 1.55; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .lead { grid-template-columns: 1fr; }
  .lead-main { padding-right: 0; border-right: 0; }
  .lead-side { padding-left: 0; margin-top: 44px; }
  .slip { max-width: 620px; }
  .multiples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .listing { columns: 2; }
  .coin-info { grid-template-columns: 1fr; row-gap: 24px; }
  .lookup { grid-template-columns: 1fr; }
  .versus { grid-template-columns: 1fr; }
  .versus > .table-scroll { padding-right: 0; border-right: 0; }
  .verdict { padding: 20px 0 0; }
  .slip--lookup { max-width: 620px; }
  .eg, .eg-api { grid-template-columns: 1fr; }
  .eg-form { max-width: 620px; }
  .eg-out { margin: 40px 0 0; padding-left: 0; border-left: 0; }
  .lk-result, html.js .lk-result { margin: 32px 0 0; padding-left: 0; border-left: 0; }
  .col-grid { grid-template-columns: 1fr 1fr; }
  .col-grid > :nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .mh-src { display: none; }
  .mh-title, .masthead--full .mh-title { padding: 18px 0 12px; }
  .mh-title { flex-wrap: wrap; }
  .lead { padding-top: 24px; }
  .guilloche { width: 420px; height: 420px; right: -250px; }
  .sec-head { grid-template-columns: 1fr; }
  .sec-note { grid-column: 1; grid-row: auto; margin-top: 10px; padding-left: 0; border-left: 0; }
  .listing { columns: 1; }
  .qa { columns: 1; }
  .notes { grid-template-columns: 1fr; }
  .notes > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule-soft); }
  .conv-grid { grid-template-columns: 1fr; gap: 28px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .kpis > div:nth-child(n+3) { border-top: 1px solid var(--rule-soft); }
  .chart-sentence { font-size: 1.25rem; }
  .chart-stats > div { padding-right: 16px; margin-right: 16px; }
  .chart-stats dd { font-size: 1.25rem; }
  .chart-canvas { height: 270px; }
  .tabs { width: 100%; justify-content: space-between; }
  .col-grid { grid-template-columns: 1fr; }
  .col-grid > * + * { padding-left: 0; border-left: 0; padding-top: 16px; border-top: 1px solid var(--rule-soft); }
  .hide-sm, .rates-table--daily td:nth-child(3) { display: none; }
  .archive > li { grid-template-columns: 1fr; }
  .rates-table--avg .t-name { display: none; }
  .promo { padding: 14px 16px 12px; }
  .rates-table--avg .t-code { margin-left: 0; font-size: .875rem; color: var(--ink); }
  .bars-list a { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 6px 0 8px; font-size: .875rem; }
  .b-track { grid-column: 1 / -1; grid-row: 2; height: 12px; }
  .bars-list .chg { font-size: .75rem; }
  .ybars { gap: 2px; height: 220px; }
  .lk-grid { grid-template-columns: 1fr; }
  .year-step { font-size: 1.25rem; }
  .slip { padding: 24px 14px 16px; }
  .eg-stage { margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
  .stamp { width: 124px; right: 10px; top: 12px; }
  .multiples a { padding: 12px 12px 10px; }
  .mu-rate { font-size: 1.75rem; }
  .mu-range { flex-direction: column; }
  .ex-wide { display: none; }
  .ex-narrow { display: block; max-width: 420px; margin-inline: auto; }
  .mh-nav ul { justify-content: space-between; gap: 12px; }
  .mh-nav li:first-child { display: none; } /* the wordmark links home */
  .mh-nav a { font-size: .875rem; }
  .nav-long { display: none; }
  .nav-short { display: inline; }
  .chart-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-stats > div { margin-right: 0; padding-left: 0; border-right: 0; }
  .chart-stats > div:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--rule-soft); }
  .chart-stats > div:nth-child(n+3) { border-top: 1px solid var(--rule-soft); }
}

/* ------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
}
