/* BookApps-profilen: Blekk, Papir og Mandarin, skrift Poppins (som innloggings-e-postene). */
@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url(fonts/poppins-latin-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Poppins; font-weight: 600; font-display: swap; src: url(fonts/poppins-latin-600.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Poppins; font-weight: 700; font-display: swap; src: url(fonts/poppins-latin-700.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Poppins; font-weight: 400; font-display: swap; src: url(fonts/poppins-latin-ext-400.woff2) format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Poppins; font-weight: 600 700; font-display: swap; src: url(fonts/poppins-latin-ext-600.woff2) format('woff2'); unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #172138;
  --paper: #F5F0E6;
  --mandarin: #FF6B35;
  --bg: var(--paper);
  --surface: #fffdf8;
  --text: var(--ink);
  --muted: #5d6475;
  --line: #e4dccb;
  --ok: #2f9e6a;
  --slow: #d99a1e;
  --degraded: #e07a2e;
  --down: #d1434b;
  --maint: #3d6fd1;
  --unknown: #a3a7b1;
  --nodata: #e8e1d2;
  --shadow: 0 1px 2px rgba(23, 33, 56, .06), 0 4px 16px rgba(23, 33, 56, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10182b;
    --surface: #172138;
    --text: var(--paper);
    --muted: #a9b0c0;
    --line: #26314d;
    --nodata: #26314d;
    --unknown: #6b7387;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.5 Poppins, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
a { color: inherit; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px; }

/* Topp */
.top { background: var(--ink); color: var(--paper); }
.top-in { display: flex; align-items: center; gap: 14px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.mark { width: 44px; height: 28px; display: block; }
.word { font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.word b { color: var(--mandarin); font-weight: 700; }
.title { color: #b9bfcc; font-size: 14px; border-left: 1px solid #34405f; padding-left: 14px; }
.lang { margin-left: auto; font: inherit; font-size: 13px; font-weight: 600; color: var(--paper); background: transparent;
  border: 1px solid #34405f; border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.lang:hover { border-color: var(--mandarin); }

main { padding-bottom: 40px; }
h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 32px 0 10px; }

/* Banner */
.banner { display: flex; align-items: center; gap: 16px; margin-top: 24px; padding: 20px 22px; border-radius: 16px;
  background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); border-left: 6px solid var(--c, var(--unknown)); }
.banner h1 { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.3; }
.banner p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.pulse { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--c, var(--unknown));
  box-shadow: 0 0 0 0 var(--c, var(--unknown)); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c, var(--unknown)) 45%, transparent); }
  70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }

.ok { --c: var(--ok); } .slow { --c: var(--slow); } .degraded { --c: var(--degraded); }
.down { --c: var(--down); } .maintenance { --c: var(--maint); } .unknown { --c: var(--unknown); }

/* Driftsmeldinger */
.notices { display: grid; gap: 8px; margin-top: 16px; }
.notice { padding: 12px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c); }
.notice strong { font-weight: 600; }
.notice small { display: block; color: var(--muted); }

/* Kort og rader */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.row { padding: 14px 18px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row-head { display: flex; align-items: center; gap: 10px; }
.row-head .name { font-weight: 600; }
.badge { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--c); white-space: nowrap; }
.badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.sub { color: var(--muted); font-size: 12px; }

/* 90-dagersstripe */
.bars { display: flex; gap: 2px; height: 26px; margin-top: 10px; }
.bars i { flex: 1; min-width: 0; border-radius: 2px; background: var(--nodata); }
.bars i.b-ok { background: var(--ok); } .bars i.b-slow { background: var(--slow); } .bars i.b-down { background: var(--down); }
.bars i:hover { opacity: .7; }
.bars-legend { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; }
@media (max-width: 560px) { .bars i:nth-child(-n+60) { display: none; } .bars-legend .d90 { display: none; } .bars-legend .d30 { display: inline; } }
.bars-legend .d30 { display: none; }

/* Appene */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.app { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); padding: 16px 18px;
  border-top: 4px solid var(--accent, var(--line)); scroll-margin-top: 16px; }
.app.focus { outline: 3px solid var(--mandarin); outline-offset: 2px; }
.app-head { display: flex; align-items: center; gap: 12px; }
.app-head > div { min-width: 0; }
.app-head img { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.app-head h3 { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.2; }
.app-head a { display: block; font-size: 12px; color: var(--muted); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-head a:hover { text-decoration: underline; }
.app-head .badge { align-self: flex-start; }
.lines { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.lines li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.lines li .badge { font-size: 12px; }
.app .uptime { font-size: 12px; color: var(--muted); margin-top: auto; padding-top: 12px; }
.app .bars { height: 20px; margin-top: 6px; }

.foot { margin-top: 36px; color: var(--muted); font-size: 13px; text-align: center; }
.foot p { margin: 4px 0; }
.foot a { color: var(--mandarin); text-decoration: none; font-weight: 600; }

@media (max-width: 560px) {
  .title { display: none; }
  .banner { padding: 16px; }
  .banner h1 { font-size: 17px; }
}
