/* Pakkasöfnun Kringlunnar 1.0 – shared design tokens & components */
:root {
  --navy: #052365; --red: #e01d3b; --pink: #ff5c78; --grey: #8291ad; --white: #ffffff;
  --navy-90: #0b2c72; --navy-70: #33508a; --ink: #0d1b3d; --muted: #5a6a8c; --line: #dfe5f0; --bg-soft: #f3f6fb;
  --c-kynlaus: var(--grey); --c-stulka: var(--red); --c-drengur: var(--navy);
  --font-head: 'Barlow', 'Barlow Semi Condensed', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius: 16px; --radius-sm: 10px; --focus: 0 0 0 3px var(--white), 0 0 0 6px var(--pink);
  --vh: 100vh;
}
@supports (height: 100dvh) { :root { --vh: 100dvh; } }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); color: var(--ink); line-height: 1.45; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--white); color: var(--navy); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip-link:focus { top: 8px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

.theme-navy { background: var(--navy); color: var(--white); }
.logo { height: clamp(34px, 6vw, 52px); width: auto; }
.eyebrow { font-family: var(--font-head); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; font-size: clamp(.8rem, 1.6vw, 1rem); color: var(--pink); margin: 0 0 .5rem; }
.h1 { font-family: var(--font-head); font-weight: 800; text-transform: uppercase; line-height: .98; letter-spacing: .01em; font-size: clamp(2.3rem, 7.5vw, 4.6rem); margin: 0 0 1rem; }
.lead { font-size: clamp(1rem, 2.2vw, 1.2rem); margin: 0 0 1.6rem; max-width: 34ch; color: rgba(255,255,255,.9); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 56px; padding: .9rem 1.8rem; border-radius: 999px; border: 2px solid transparent; font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: transform .15s ease, background-color .15s ease, opacity .15s ease; touch-action: manipulation; }
.btn-primary { background: var(--red); color: var(--white); }
.btn-primary:hover:not(:disabled) { background: #c8132f; }
.btn-primary:active:not(:disabled) { transform: scale(.98); }
.btn-primary:disabled { background: #6c7fa8; color: #e7ecf6; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.6); }
.btn-link { background: none; border: none; color: inherit; font-weight: 600; font-size: 1rem; cursor: pointer; padding: .6rem .4rem; min-height: 44px; display: inline-flex; align-items: center; gap: .35rem; text-decoration: none; }

/* ---------- Chart (public + view) ---------- */
.chart-card { background: var(--white); color: var(--ink); border-radius: var(--radius); padding: clamp(14px, 2.4vw, 28px); box-shadow: 0 18px 40px rgba(0,0,0,.18); }
.chart { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(6px, 1.6vw, 22px); align-items: end; height: var(--chart-h, 220px); border-bottom: 2px solid var(--line); padding: 0 2px; }
.chart-group { display: flex; align-items: flex-end; justify-content: center; gap: clamp(2px, .5vw, 6px); height: 100%; }
.bar { flex: 1 1 0; max-width: 46px; height: 0; border-radius: 6px 6px 0 0; transition: height .8s cubic-bezier(.22,.8,.25,1); position: relative; }
.bar.kynlaus { background: var(--c-kynlaus); }
.bar.stulka { background: var(--c-stulka); }
.bar.drengur { background: var(--c-drengur); }
.chart-labels { display: grid; grid-template-columns: repeat(6, 1fr); gap: clamp(6px, 1.6vw, 22px); margin-top: .5rem; text-align: center; font-family: var(--font-head); font-weight: 700; font-size: clamp(.72rem, 1.6vw, 1rem); color: var(--navy); }
.chart-labels span { white-space: nowrap; }
.legend { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.2rem; margin: 0 0 .9rem; padding: 0; list-style: none; font-weight: 600; font-size: clamp(.8rem, 1.6vw, 1rem); }
.legend li { display: inline-flex; align-items: center; gap: .45rem; }
.swatch { width: 14px; height: 14px; border-radius: 4px; display: inline-block; flex: none; }
.swatch.kynlaus { background: var(--c-kynlaus); } .swatch.stulka { background: var(--c-stulka); } .swatch.drengur { background: var(--c-drengur); }
.chart-empty { text-align: center; color: var(--muted); font-weight: 600; margin: .8rem 0 0; }
.updated { font-size: .9rem; color: rgba(255,255,255,.8); margin: .9rem 0 0; font-variant-numeric: tabular-nums; }
.updated.stale { color: #ffd3da; font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
