@font-face {
  font-family: 'Satoshi';
  src: url('../app/assets/fonts/Satoshi-Regular.ttf') format('truetype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../app/assets/fonts/Satoshi-Bold.ttf') format('truetype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Satoshi';
  src: url('../app/assets/fonts/Satoshi-Black.ttf') format('truetype');
  font-weight: 900; font-style: normal; font-display: swap;
}

/* The dashboard's tokens (app/styles.css :root) */
:root {
  --text:        #15263b;
  --text-muted:  #7c8a9a;
  --brand-blue:  #0050a1;
  --brand-green: #0da100;
  --track:       #c8ddf0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: transparent; }
body {
  font-family: 'Satoshi', system-ui, sans-serif;
  font-size: 14px;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  /* Room for the cards' shadows, which the frame would otherwise clip. */
  padding: 4px;
}

/* One row height for every card: 1fr auto rows are all as tall as the
   tallest card, in one column or two. */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: 1fr;
  gap: 10px;
}
@media (min-width: 720px) {
  .cards { grid-template-columns: 1fr 1fr; }
}

/* The phone card (.income-box), white for all four: the dashboard tints the
   two production cards light blue because they double as a chart selector,
   which the widget is not. */
.card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  padding: 16px 20px;
  min-width: 0;
}

.card__title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 7px;
}
/* The short rule under the income titles (.income-ticker__rule). */
.card__rule {
  width: 34px;
  height: 3px;
  border-radius: 2px;
  background: var(--text);
  margin: 2px auto 8px;
}

.value-row {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 6px;
  max-width: 100%;
}
.value {
  font-size: clamp(26px, 9vw, 35.28px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* The whole MWh under the GWh, raised, so the figure visibly moves. */
.value sup {
  font-size: 0.42em;
  font-weight: 900;
  margin-left: 2px;
}
.unit {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
}

/* "Tilsvarer ..." lines and the context lines under the production cards. */
.lines {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.line {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  line-height: 1.35;
  color: var(--text-muted);
}
.line svg { flex-shrink: 0; width: 15px; height: 15px; }
.line--ctx { margin-top: 6px; }
.line--ctx svg { width: 18px; height: 18px; opacity: 0.75; }
.line b { color: var(--text); font-weight: 700; }

.donut { display: block; width: 160px; height: 71px; margin-top: 8px; }

/* The year-to-date bar (.ytd-hbar): a normal full year long, the black tick
   where a normal year stood today, green past a normal year. */
.bar {
  position: relative;
  width: 100%;
  height: 20px;
  margin: 13px 0 6px;
  border-radius: 10px;
  background: var(--track);
}
.bar__fill, .bar__over {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  border-radius: 10px;
  transition: width 0.5s ease;
}
.bar__fill { background: var(--brand-blue); width: 0; }
.bar__over { background: var(--brand-green); }
.bar__over[hidden], .bar__tick[hidden] { display: none; }
.bar__tick {
  position: absolute;
  top: -5px;
  bottom: -5px;
  width: 2px;
  transform: translateX(-50%);
  background: var(--text);
}
