/* status.letmcp.dk (packages/status/src/page.ts). letmcp's tokens and rules (packages/ui/README.md):
   ink is the brand, green means only "runs", Schibsted Grotesk for everything, square corners (2 px at
   most), no shadows, status as dot and text. Light for everyone, as on letmcp.dk. */
@font-face { font-family: "Schibsted Grotesk"; src: url("/fonts/schibsted-grotesk.woff2") format("woff2"); font-weight: 400 900; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f7f6f2; --surface: #ffffff; --sunken: #efede7; --line: #e0ddd5; --line-strong: #808580;
  --fg: #141714; --fg-muted: #5c625e; --on-ink: #eef0ec;
  --ok: #2f6b45; --warn: #9a4a17; --danger: #a8352b;
  --font: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 15px/1.5 var(--font); }
a { color: var(--fg); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
main { max-width: 760px; margin: 0 auto; padding: 24px 16px 48px; display: flex; flex-direction: column; gap: 16px; }
h1, h2, h3 { margin: 0; letter-spacing: -0.022em; }
h2 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
.lille { font-size: 13px; color: var(--fg-muted); }
.akse { font-variant-numeric: tabular-nums; }
.skjult { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 8px; }
.maerke { display: flex; align-items: baseline; gap: 10px; }
.maerke:hover { text-decoration: none; }
.ordmaerke { height: 26px; width: auto; display: block; color: var(--fg); align-self: center; }
.maerke .under { color: var(--fg-muted); font-weight: 500; font-size: 17px; }

.kort { background: var(--surface); border-radius: 2px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }

.helt { padding: 20px; gap: 12px; }
.helt-top { display: flex; align-items: center; gap: 12px; }
.helt h1 { font-size: 28px; line-height: 1.2; font-weight: 600; }
.prik { width: 12px; height: 12px; border-radius: 50%; flex: none; background: transparent; box-shadow: inset 0 0 0 2px var(--fg-muted); }
.prik-o { background: var(--ok); box-shadow: none; }
.prik-n { background: var(--warn); box-shadow: none; }
.prik-u { background: var(--danger); box-shadow: none; }
.prik-v { background: var(--fg-muted); box-shadow: none; }
.aktiv { display: flex; flex-direction: column; gap: 6px; padding-left: 24px; }

.opdateringer { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.opdateringer li { display: flex; gap: 12px; font-size: 14px; }
.opdateringer time { color: var(--fg-muted); font-size: 13px; flex: none; min-width: 9.5em; padding-top: 1px; }

/* Status as dot and text (packages/ui, lm-status). */
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; white-space: nowrap; flex: none; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--fg-muted); flex: none; }
.status-o::before { background: var(--ok); }
.status-n { color: var(--warn); } .status-n::before { background: var(--warn); }
.status-u { color: var(--danger); } .status-u::before { background: var(--danger); }
.status-v, .status-k { color: var(--fg-muted); }
.status-k::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--fg-muted); }

.punkter { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.punkt { padding: 14px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.punkt:first-child { border-top: 0; padding-top: 0; }
.punkt:last-child { padding-bottom: 0; }
.punkt-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* The day bar. A day without measurements is a quiet flat grey. */
.bar { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; height: 28px; }
.c { flex: 1 1 0; min-width: 2px; border-radius: 1px; position: relative; background: var(--sunken); }
.c-o { background: var(--ok); }
.c-n { background: var(--warn); }
.c-u { background: var(--danger); }
.c-v { background: var(--line-strong); }
.c:hover { opacity: 0.75; }
.c:hover::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: 280px; padding: 6px 10px; border-radius: 2px; z-index: 5;
  background: var(--fg); color: var(--on-ink); font-size: 12px; line-height: 1.45; pointer-events: none; white-space: normal;
}
.c.tip-v:hover::after { left: 0; transform: none; }
.c.tip-h:hover::after { left: auto; right: 0; transform: none; }
.akse { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--fg-muted); }
.mobil-vis { display: none; }

.tidligere { display: flex; flex-direction: column; gap: 4px; padding-top: 12px; border-top: 1px solid var(--line); }
.tidligere:first-of-type { border-top: 0; padding-top: 2px; }
.tidligere .opdateringer { margin-top: 4px; }

.fod { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; padding: 0 2px; }
.fod a { color: var(--fg-muted); }

@media (max-width: 640px) {
  main { padding-top: 16px; }
  .helt h1 { font-size: 22px; }
  .aktiv { padding-left: 0; }
  .opdateringer li { flex-direction: column; gap: 0; }
  .bar .c:nth-child(-n+60) { display: none; }
  .mobil-skjul { display: none; }
  .mobil-vis { display: inline; }
  .c:hover::after, .c.tip-v:hover::after, .c.tip-h:hover::after { left: auto; right: 0; transform: none; }
  .bar .c:nth-child(n+61):nth-child(-n+70):hover::after { left: 0; right: auto; }
}
@media (forced-colors: active) {
  .c { border: 1px solid CanvasText; }
  .c-u, .c-n { background: Highlight; }
}
