/* Kvitegga (B) + mobil først (D) */
:root{
  --bg:#070b12;
  --panel:#0b1020;
  --panel2:#0a0f1b;
  --line:rgba(255,255,255,0.10);
  --muted:rgba(255,255,255,0.68);
  --text:rgba(255,255,255,0.92);

  --kv-blue:#6aa6ff;
  --kv-cyan:#49e6ff;
  --kv-red:#ff4d6d;
  --kv-green:#5cff8a;

  --radius:16px;
  --shadow:0 10px 28px rgba(0,0,0,0.42);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
  background:radial-gradient(1200px 600px at 25% -10%, rgba(106,166,255,0.18), transparent 55%),
             radial-gradient(900px 500px at 90% 0%, rgba(73,230,255,0.12), transparent 55%),
             var(--bg);
  color:var(--text);
}

code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:0.95em}
a{color:inherit}

/* Topbar */
.topbar{
  position:sticky; top:0; z-index:5;
  background:rgba(4,6,12,0.82);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--line);
  padding:10px 12px;
  display:flex; align-items:center; gap:10px;
}
.hamburger{
  width:38px; height:38px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(255,255,255,0.04);
  color:var(--muted);
  display:grid; place-items:center;
}
.hamburger:before{content:"≡";font-size:18px;line-height:1}
.search{flex:1;display:flex;align-items:center;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:rgba(255,255,255,0.04);}
.search input{width:100%;padding:10px 10px;border:0;outline:0;background:transparent;color:var(--text);font-size:14px;}
.topbtn{
  padding:10px 10px;
  border-radius:12px;
  border:1px solid var(--line);
  color:var(--muted);
  background:rgba(255,255,255,0.04);
  font-size:13px;
  white-space:nowrap;
}
.topbtn.isActive{
  color:rgba(255,255,255,0.95);
  border-color:rgba(106,166,255,0.45);
  background:linear-gradient(180deg, rgba(106,166,255,0.18), rgba(255,255,255,0.02));
}

/* Hero */
.hero{
  height:120px;
  border-bottom:1px solid var(--line);
  background:
    radial-gradient(800px 240px at 20% 0%, rgba(106,166,255,0.28), transparent 60%),
    radial-gradient(650px 220px at 85% 20%, rgba(73,230,255,0.18), transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent 70%);
}
.heroInner{max-width:1100px;margin:0 auto;padding:18px 14px;}
.heroTitle{letter-spacing:0.18em;font-weight:800;font-size:18px}
.heroSub{margin-top:6px;color:var(--muted);font-size:13px}

/* Layout */
.wrap{max-width:1100px;margin:0 auto;padding:14px;}
.station{scroll-margin-top:74px}
.panel{
  background:linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
  margin:10px 0 18px;
}
.stationPanel{padding:12px}

.brandRow{
  display:flex; align-items:center; gap:12px;
  padding:14px 6px 6px;
}
.logo{
  width:46px;height:46px;border-radius:16px;
  background:
    radial-gradient(12px 12px at 35% 30%, rgba(255,255,255,0.22), transparent 65%),
    linear-gradient(180deg, rgba(106,166,255,0.32), rgba(73,230,255,0.10));
  border:1px solid rgba(106,166,255,0.22);
  box-shadow:0 10px 22px rgba(0,0,0,0.35);
  position:relative;
}
.logo:after{
  content:"";
  position:absolute; inset:0;
  background:
    linear-gradient(135deg, transparent 45%, rgba(255,255,255,0.08) 55%, transparent 70%);
  border-radius:16px;
  mix-blend-mode:screen;
}
.dimRow .logo{
  background:
    radial-gradient(12px 12px at 35% 30%, rgba(255,255,255,0.18), transparent 65%),
    linear-gradient(180deg, rgba(92,255,138,0.22), rgba(106,166,255,0.06));
  border:1px solid rgba(92,255,138,0.18);
}

.brandText .name{font-weight:800;font-size:18px}
.brandText .sub{margin-top:2px;color:var(--muted);font-size:12.5px;line-height:1.25}
.updated{margin-left:auto;display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12.5px;}
.refreshDot{width:10px;height:10px;border-radius:99px;background:rgba(106,166,255,0.55);box-shadow:0 0 0 4px rgba(106,166,255,0.12);}

/* Cards */
.mainGrid{display:grid;gap:12px}
.leftCard,.rightCard{
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:rgba(255,255,255,0.02);
  padding:12px;
}
.dialRow{display:flex;gap:12px;align-items:center}
.dial{
  width:120px;height:120px;border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  background:radial-gradient(circle at 40% 35%, rgba(255,255,255,0.06), rgba(0,0,0,0.15));
  position:relative;
  flex:0 0 auto;
}
.cardinal{position:absolute;color:rgba(255,255,255,0.70);font-size:12px;font-weight:700}
.cardinal.n{top:8px;left:50%;transform:translateX(-50%)}
.cardinal.s{bottom:8px;left:50%;transform:translateX(-50%)}
.cardinal.e{right:8px;top:50%;transform:translateY(-50%)}
.cardinal.w{left:8px;top:50%;transform:translateY(-50%)}
.needle{
  position:absolute; left:50%; top:50%;
  width:2px; height:46px;
  background:linear-gradient(180deg, rgba(255,77,109,0.95), rgba(255,77,109,0.0));
  transform-origin:bottom;
  transform:translate(-50%,-100%) rotate(0deg);
}
.centerDot{
  position:absolute; left:50%; top:50%;
  width:10px;height:10px;border-radius:99px;
  background:rgba(255,255,255,0.85);
  transform:translate(-50%,-50%);
  box-shadow:0 0 0 5px rgba(255,255,255,0.06);
}

.dialMeta{min-width:0}
.bigWind{font-size:34px;font-weight:900;letter-spacing:-0.02em}
.windUnit{font-size:14px;color:var(--muted);margin-left:6px;font-weight:700}
.tempMini{margin-top:2px;color:rgba(255,255,255,0.86);font-size:13px}
.miniMeta{margin-top:2px;color:var(--muted);font-size:12.5px}

.dailyBar{
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid var(--line);
  display:flex;align-items:baseline;gap:6px;flex-wrap:wrap;
}
.muted{color:var(--muted)}
.sep{opacity:0.55;margin:0 2px}

.statRow{padding:10px 0;border-bottom:1px solid var(--line)}
.statHead{color:var(--muted);font-size:12.5px;margin-bottom:6px}
.statBody{display:flex;align-items:center;justify-content:space-between;gap:10px}
.statMain{display:flex;align-items:baseline;gap:8px;font-size:28px;font-weight:900}
.statMain .u{font-size:12.5px;color:var(--muted);font-weight:700}
.badge{
  display:inline-flex;align-items:center;gap:8px;
  padding:6px 10px;border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(255,255,255,0.03);
  font-size:12.5px;color:rgba(255,255,255,0.86);
}
.tick{width:8px;height:8px;border-radius:99px;background:rgba(92,255,138,0.85);box-shadow:0 0 0 4px rgba(92,255,138,0.12)}
.statSide{color:rgba(255,255,255,0.86);font-size:13px;display:grid;gap:4px;justify-items:end}

.tempBubble{
  width:58px;height:58px;border-radius:999px;
  display:grid;place-items:center;
  background:radial-gradient(circle at 35% 30%, rgba(255,255,255,0.10), rgba(0,0,0,0.22));
  border:1px solid rgba(255,255,255,0.12);
  font-weight:900;font-size:18px;
}

/* Charts */
.charts{display:grid;gap:12px;margin-top:12px}
.chartCard{
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:rgba(255,255,255,0.02);
  overflow:hidden;
}
.chartTitle{padding:10px 12px;border-bottom:1px solid var(--line);color:rgba(255,255,255,0.86);font-weight:800;font-size:13px}
.chart{height:220px;}

/* Dimmelsvik layout */
.dimGrid{display:grid;gap:12px}
.dimCards{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.dimCard{
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:rgba(255,255,255,0.02);
  padding:12px;
}
.label{color:var(--muted);font-size:12.5px}
.bigValue{margin-top:6px;font-size:28px;font-weight:900;display:flex;align-items:baseline;gap:6px}
.unit{font-size:12.5px;color:var(--muted);font-weight:700}
.dimCharts{display:grid;gap:12px}

/* Footer */
.footer{padding:14px 2px 22px}
.footRow{display:flex;flex-wrap:wrap;gap:6px;align-items:center;justify-content:center}

/* Desktop enhancements */
@media (min-width: 860px){
  .hero{height:150px}
  .mainGrid{grid-template-columns: 1.2fr 1fr}
  .charts{grid-template-columns: 1fr 1fr 1fr}
  .chart{height:240px}
  .dimGrid{grid-template-columns: 1fr 1.2fr}
  .dimCharts{grid-template-columns: 1fr 1fr}
}


/* Topnav scroll (mobil) */
.topnav{
  display:flex;
  gap:10px;
  align-items:center;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
}
.topnav::-webkit-scrollbar{display:none}
.linkbtn{ text-decoration:none; display:inline-flex; align-items:center; justify-content:center; }

.spacer{flex:1}

/* Stat pages */
.smallHero{height:110px}
.statPageGrid{display:grid;gap:12px}
.tableWrap{overflow:auto}
.kvTable{width:100%;border-collapse:collapse;font-size:13px}
.kvTable th,.kvTable td{padding:10px 10px;border-bottom:1px solid var(--line);text-align:left;white-space:nowrap}
.kvTable th{color:rgba(255,255,255,0.80);font-weight:800;background:rgba(255,255,255,0.02)}
.tallChart{height:260px}
@media (min-width:860px){
  .statPageGrid{grid-template-columns:1fr 1fr}
  .tallChart{height:300px}
}


/* Dashboard */
.dashControls{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:flex-end;
}
.ctrl{
  min-width:140px;
  flex:1 1 140px;
}
.ctrlLabel{
  color:var(--muted);
  font-size:12.5px;
  margin:2px 2px 6px;
  font-weight:700;
}
.ctrlInput{
  width:100%;
  padding:10px 10px;
  border-radius:12px;
  border:1px solid var(--line);
  background:rgba(255,255,255,0.04);
  color:var(--text);
  outline:none;
}
.dashCards{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin-top:12px;
}
.dashCard{
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:rgba(255,255,255,0.02);
  padding:12px;
}
@media (min-width: 860px){
  .dashCards{grid-template-columns:1fr 1fr 1fr 1fr}
}


/* Keep a nice height that matches other charts; adapt on desktop */
.yrFrame{
  width:100%;
  height:260px;
  border:0;
  border-radius:12px;
  overflow:hidden;
  background:rgba(0,0,0,0.18);
}
@media (min-width:860px){
  .yrFrame{height:320px}
}



.yrFrame{
  width:100%;
  max-width:1000px; /* keeps it aligned with main content width */
  height:260px;
  border:0;
  border-radius:14px;
  overflow:hidden;
  background:rgba(0,0,0,0.18);
  box-shadow:var(--shadow);
}

@media (min-width:860px){
  .yrFrame{
    height:340px;
  }
}



.yrFrame{
  width:100%;
  max-width:1000px;
  height:340px; /* taller on mobile for better proportions */
  border:0;
  border-radius:14px;
  overflow:hidden;
  background:rgba(0,0,0,0.18);
  box-shadow:var(--shadow);
}

@media (min-width:860px){
  .yrFrame{
    height:420px; /* desktop height increased */
  }
}


/* Yr meteogram responsive (782x391 ratio ≈ 2:1) */
.yrWrap{
  width:100%;
  border-top:1px solid var(--line);
  background:rgba(0,0,0,0.12);
  padding:18px 0;
  display:flex;
  justify-content:center;
}

.yrFrame{
  width:100%;
  max-width:1100px;
  aspect-ratio: 782 / 391; /* keeps correct proportions */
  border:0;
  border-radius:14px;
  overflow:hidden;
  background:rgba(0,0,0,0.18);
  box-shadow:var(--shadow);
}


/* Hero image (Kvitegga panorama) */

.heroOverlay{
  width:100%;
  background:linear-gradient(to top, rgba(0,0,0,0.65), rgba(0,0,0,0.15) 60%, transparent);
  padding:20px 14px;
}

@media (min-width:860px){
  }




/* Hero image compact version */
.heroImage{
  position:relative;
  width:100%;
  max-width:1100px;
  margin:12px auto 0 auto;
  overflow:hidden;
  height:140px;   /* fixed compact height */
  border-radius:16px;
}

.heroImg{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.heroOverlay{
  position:absolute;
  bottom:0;
  left:0;
  width:100%;
  background:linear-gradient(to top, rgba(0,0,0,0.65), rgba(0,0,0,0.15) 60%, transparent);
  padding:12px 14px;
}

@media (min-width:860px){
  .heroImage{
    height:180px;  /* slightly taller on desktop */
  }
}
}
}
