:root {
  --bg: #eef2eb;
  --bg-strong: #e3e9de;
  --surface: rgba(255, 255, 255, 0.9);
  --surface-strong: #ffffff;
  --surface-soft: rgba(248, 245, 236, 0.92);
  --text: #13211c;
  --muted: #5a695f;
  --line: rgba(23, 38, 31, 0.12);
  --line-strong: rgba(23, 38, 31, 0.18);
  --accent: #1f6a63;
  --accent-strong: #174f4a;
  --accent-soft: rgba(31, 106, 99, 0.11);
  --gold: #c6932e;
  --gold-soft: rgba(198, 147, 46, 0.14);
  --up: #1f7a4a;
  --down: #bb5d33;
  --neutral: #74857b;
  --shadow: 0 18px 50px rgba(23, 33, 28, 0.08);
  --radius-panel: 22px;
  --radius-card: 8px;
  --topbar-bg: rgba(245, 243, 234, 0.84);
  --topbar-line: rgba(19, 33, 28, 0.08);
  --indicator-surface: rgba(18, 31, 27, 0.96);
  --indicator-line: rgba(255, 255, 255, 0.08);
  --hero-panel: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(245, 243, 234, 0.78));
  --ghost-bg: rgba(255, 255, 255, 0.72);
  --control-bg: rgba(255, 255, 255, 0.96);
  --control-text: #13211c;
}

html[data-theme="dark"],
body[data-theme="dark"] {
  --bg: #0f1524;
  --bg-strong: #131d30;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-strong: rgba(255, 255, 255, 0.055);
  --surface-soft: rgba(255, 255, 255, 0.045);
  --text: #e6ecff;
  --muted: rgba(230, 236, 255, 0.72);
  --line: rgba(148, 163, 184, 0.2);
  --line-strong: rgba(148, 163, 184, 0.28);
  --accent: #67b7a5;
  --accent-strong: #93d5c7;
  --accent-soft: rgba(103, 183, 165, 0.2);
  --gold: #d1a44f;
  --gold-soft: rgba(209, 164, 79, 0.2);
  --up: #64d39a;
  --down: #f29c76;
  --neutral: #b8c6dd;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  --topbar-bg: rgba(14, 21, 36, 0.85);
  --topbar-line: rgba(255, 255, 255, 0.08);
  --indicator-surface: rgba(12, 20, 34, 0.95);
  --indicator-line: rgba(255, 255, 255, 0.12);
  --hero-panel: linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  --ghost-bg: rgba(255, 255, 255, 0.06);
  --control-bg: rgba(12, 20, 34, 0.94);
  --control-text: #e6ecff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.85), transparent 38%),
    linear-gradient(180deg, #f5f3ea 0%, var(--bg) 22%, var(--bg-strong) 100%);
  min-height: 100vh;
}

a,
button,
input {
  font: inherit;
}

.container {
  width: min(1180px, calc(100vw - 40px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--topbar-line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0;
}

.brand img {
  width: 34px;
  height: 34px;
}

.topbar-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.topbar-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  text-decoration: none;
  color: var(--muted);
  border-radius: 999px;
  font-weight: 600;
  transition:
    background-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.topbar-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.85);
}

.topbar-nav a.is-active {
  color: var(--text);
  background: var(--surface-strong);
  box-shadow: 0 8px 18px rgba(19, 33, 28, 0.08);
}

main {
  padding-bottom: 56px;
}

.hero {
  padding: 34px 0 28px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 26px;
  align-items: stretch;
}

.hero-inner > div:first-child {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--hero-panel), linear-gradient(120deg, rgba(31, 106, 99, 0.08), transparent 60%);
  box-shadow: var(--shadow);
}

.kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent);
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

h1 {
  margin: 10px 0 12px;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: 0.94;
  font-weight: 700;
}

.subtext {
  max-width: 40rem;
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.6;
}

.market-indicators {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
  padding: 16px;
  border: 1px solid rgba(19, 33, 28, 0.09);
  border-radius: var(--radius-panel);
  background: var(--indicator-surface);
  box-shadow: var(--shadow);
}

.indicator {
  position: relative;
  min-height: 156px;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--indicator-line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
    rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.indicator::after {
  content: "";
  position: absolute;
  inset: auto 18px 18px 18px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.26), transparent);
}

.indicator .label {
  max-width: 11ch;
  font-size: 0.82rem;
  line-height: 1.3;
  color: rgba(231, 238, 233, 0.74);
}

.indicator .value {
  max-width: 12ch;
  font-size: clamp(1.4rem, 2vw, 2rem);
  line-height: 1.05;
  font-weight: 700;
  color: #f8faf8;
}

.indicator-icon {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 1rem;
  font-weight: 700;
}

.indicator-icon.up,
.value.up {
  color: #7be3aa;
}

.indicator-icon.down,
.value.down {
  color: #ffc38f;
}

.indicator-icon.neutral,
.value.neutral {
  color: #d8e2da;
}

.panel {
  padding: 18px 0;
}

.panel.alt {
  position: relative;
}

.panel.alt::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.panel .container {
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel.alt .container {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 245, 236, 0.78)),
    var(--surface-soft);
}

#prisbevakning {
  scroll-margin-top: 112px;
}

.panel-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.panel-header h2 {
  margin: 0 0 6px;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.7rem, 2.5vw, 2.35rem);
  line-height: 1.05;
}

.muted {
  color: var(--muted);
}

.signal-grid,
.trend-grid,
.report-grid {
  display: grid;
  gap: 16px;
}

.period-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.period-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-strong);
}

.period-card h3 {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.05;
}

.period-card h3.up {
  color: var(--up);
}

.period-card h3.down {
  color: var(--down);
}

.period-card h3.neutral {
  color: var(--neutral);
}

.period-label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.signal-controls {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.control-field {
  display: grid;
  gap: 5px;
}

.control-field span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

.control-field select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  background: var(--control-bg);
  color: var(--control-text);
}

.signal-count {
  margin: -4px 0 14px;
}

.signal-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.signal-card,
.trend-card,
.report-card,
.insights-card {
  position: relative;
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface-strong);
  box-shadow: 0 8px 24px rgba(19, 33, 28, 0.05);
}

.signal-card {
  padding: 18px 18px 18px 24px;
}

.signal-card::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 12px;
  width: 4px;
  border-radius: 999px;
  background: #d3ddd5;
}

.signal-card[data-category="Pris"]::before,
.signal-card[data-category="price"]::before {
  background: #218b7f;
}

.signal-card[data-category="Risk"]::before,
.signal-card[data-category="risk"]::before {
  background: #d96e40;
}

.signal-card[data-category="Efterfrågan"]::before,
.signal-card[data-category="demand"]::before {
  background: #c6932e;
}

.signal-head,
.trend-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.signal-tag,
.trust-score,
.verified-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.signal-tag {
  background: #edf2ee;
  color: #3f5c54;
}

.signal-tag.price,
.signal-tag.is-price {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.signal-tag.risk,
.signal-tag.is-risk {
  background: rgba(217, 110, 64, 0.12);
  color: #9a4a29;
}

.signal-tag.demand,
.signal-tag.is-demand {
  background: var(--gold-soft);
  color: #7c5a17;
}

.signal-meta,
.report-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.signal-text {
  margin: 0;
  color: var(--text);
  font-size: 0.97rem;
  line-height: 1.55;
}

.signal-attribution {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trust-high,
.verified-badge {
  background: rgba(31, 122, 74, 0.12);
  color: var(--up);
}

.trust-medium {
  background: var(--gold-soft);
  color: #8f6413;
}

.trust-low {
  background: rgba(116, 133, 123, 0.14);
  color: #506056;
}

.trend-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trend-card {
  padding: 18px;
  align-content: start;
}

.trend-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.trend-meta {
  font-size: 0.86rem;
  color: var(--muted);
}

.trend-meta.up {
  color: var(--up);
}

.trend-meta.down {
  color: var(--down);
}

.trend-meta.neutral {
  color: var(--neutral);
}

.trend-chart {
  min-height: 116px;
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: grid;
  align-items: end;
}

.trend-chart svg path {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  color: #14211d;
  background: linear-gradient(135deg, #d5a33a, #f0c96a);
  box-shadow: 0 10px 24px rgba(198, 147, 46, 0.24);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: saturate(1.05);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

.btn.ghost {
  color: var(--text);
  background: var(--ghost-bg);
  border: 1px solid var(--line);
  box-shadow: none;
}

.text-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.pulse-watch-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(198, 147, 46, 0.24);
  border-radius: var(--radius-card);
  background:
    linear-gradient(135deg, rgba(255, 250, 239, 0.96), rgba(241, 245, 239, 0.92)),
    #fff;
  box-shadow: 0 12px 28px rgba(19, 33, 28, 0.06);
}

.pulse-watch-cta h2 {
  margin: 0 0 8px;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.6rem, 2.4vw, 2.15rem);
  line-height: 1.06;
}

.pulse-watch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.report-grid {
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.report-card,
.insights-card {
  padding: 20px;
}

.report-card h3 {
  margin: 4px 0 8px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.8rem;
  line-height: 1.08;
}

.insights-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.insights-list li {
  position: relative;
  padding-left: 16px;
  color: var(--text);
  line-height: 1.5;
}

.insights-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
}

.cta {
  padding: 20px 0 10px;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 26px;
  border: 1px solid rgba(198, 147, 46, 0.28);
  border-radius: var(--radius-panel);
  background:
    linear-gradient(135deg, rgba(255, 250, 239, 0.96), rgba(241, 245, 239, 0.92)),
    #fff;
  box-shadow: var(--shadow);
}

.cta-inner h2 {
  margin: 0 0 6px;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  line-height: 1.06;
}

.market-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(360px, calc(100vw - 32px));
  padding: 13px 15px;
  border-radius: 8px;
  color: #fff;
  background: #22352f;
  box-shadow: 0 18px 34px rgba(19, 33, 28, 0.2);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.market-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.market-toast[data-variant="success"] {
  background: #1f6f43;
}

.market-toast[data-variant="error"] {
  background: #9d4f2c;
}

@media (max-width: 980px) {
  .hero-inner,
  .period-grid,
  .trend-grid,
  .signal-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .market-indicators {
    grid-template-columns: 1fr;
  }

  .indicator {
    min-height: 0;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100vw - 24px, 1180px);
  }

  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-nav {
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
  }

  .signal-controls {
    width: 100%;
  }

  .control-field,
  .control-field select {
    width: 100%;
  }

  .hero {
    padding-top: 18px;
  }

  h1 {
    font-size: clamp(2.1rem, 11vw, 2.9rem);
    line-height: 0.98;
  }

  .subtext {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  .hero-inner > div:first-child,
  .panel .container,
  .cta-inner {
    padding-left: 18px;
    padding-right: 18px;
  }

  .panel .container {
    padding-top: 22px;
    padding-bottom: 22px;
  }

  .panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
  }

  .signal-count {
    margin-bottom: 10px;
  }

  .period-card {
    padding: 16px;
  }

  .period-card h3 {
    font-size: 1.35rem;
  }

  .market-indicators {
    padding: 12px;
    gap: 10px;
  }

  .indicator {
    padding: 14px;
    gap: 10px;
  }

  .indicator .value {
    font-size: clamp(1.2rem, 6vw, 1.6rem);
  }

  .trend-card {
    gap: 10px;
  }

  .cta-inner {
    align-items: stretch;
  }

  .pulse-watch-cta,
  .pulse-watch-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .btn.ghost {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100vw - 18px, 1180px);
  }

  .topbar-nav a {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.88rem;
  }

  .hero-inner > div:first-child,
  .panel .container,
  .cta-inner {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-inner > div:first-child {
    padding-top: 20px;
    padding-bottom: 20px;
  }

  .panel .container {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .signal-controls {
    gap: 8px;
  }

  .control-field select {
    min-height: 36px;
  }

  .trend-chart {
    min-height: 96px;
  }
}
