/* status.arwidev.pl — ARWI.DEV brand: Unbounded / Inter Tight / JetBrains Mono, blue #0A6CFF on near-black */

@font-face { font-family: 'Inter Tight'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/inter-tight-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: 'Inter Tight'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/inter-tight-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-display: swap; font-weight: 200 900; src: url(fonts/unbounded-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: 'Unbounded'; font-style: normal; font-display: swap; font-weight: 200 900; src: url(fonts/unbounded-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 100 800; src: url(fonts/jetbrains-mono-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 100 800; src: url(fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  color-scheme: dark;
  --bg: #04060b;
  --bg-glow: rgba(10, 108, 255, 0.16);
  --surface: #0b1020;
  --surface-2: #10172a;
  --line: rgba(160, 190, 255, 0.12);
  --line-2: rgba(160, 190, 255, 0.22);
  --ink: #eef3ff;
  --ink-2: #a7b2c8;
  --ink-3: #69748b;
  --blue: #0a6cff;
  --blue-2: #3d8bff;
  --ok: #2ed68a;
  --minor: #e9c46a;
  --warn: #ff9f43;
  --crit: #ff4d6d;
  --none: #1b2234;
  --maint: #3d8bff;
  --f-display: 'Unbounded', 'Inter Tight', system-ui, sans-serif;
  --f-text: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
  --radius: 16px;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f3f6fc;
    --bg-glow: rgba(10, 108, 255, 0.1);
    --surface: #ffffff;
    --surface-2: #f6f8fd;
    --line: #dde3ec;
    --line-2: #c8d1df;
    --ink: #0b1020;
    --ink-2: #4a556c;
    --ink-3: #5b667d;
    --ok: #12a35b;
    --minor: #b88a12;
    --warn: #d96d10;
    --crit: #d92d4c;
    --none: #e3e8f1;
    --maint: #0a6cff;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(1100px 520px at 50% -180px, var(--bg-glow), transparent 70%), var(--bg);
  background-repeat: no-repeat;
  color: var(--ink);
  font: 15px/1.55 var(--f-text);
}

a { color: var(--blue-2); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 3px; border-radius: 6px; }

.wrap {
  width: min(880px, 100%);
  margin: 0 auto;
  padding: 28px 16px 56px;
}

/* ── header ── */
.top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
/* the ARWI.DEV fox; the dark-theme file carries its own glow */
.mascot { display: block; width: 66px; height: 66px; margin: -14px -6px -14px -12px; }
.logotyp { display: block; width: 154px; height: auto; }

.top-title {
  padding-left: 14px;
  border-left: 1px solid var(--line-2);
  color: var(--ink-2);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.lang {
  display: inline-flex;
  margin-left: auto;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.lang a {
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--ink-3);
  font: 600 11px var(--f-mono);
  letter-spacing: 0.08em;
}

.lang a:hover { color: var(--ink); text-decoration: none; }
.lang a[aria-current] { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }

/* ── overall banner ── */
.banner {
  --c: var(--ok);
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  border-radius: var(--radius);
  background: linear-gradient(120deg, color-mix(in srgb, var(--c) 16%, var(--surface)), var(--surface) 70%);
  overflow: hidden;
}

.b-degraded { --c: var(--minor); }
.b-partial { --c: var(--warn); }
.b-outage { --c: var(--crit); }
.b-unknown { --c: var(--ink-3); }

.banner h1 {
  margin: 0;
  font: 600 clamp(19px, 3.6vw, 25px) / 1.25 var(--f-display);
  letter-spacing: -0.01em;
}

.banner p { margin: 4px 0 0; color: var(--ink-2); font-size: 13px; }
.banner time { font-family: var(--f-mono); font-size: 12px; }

.beacon {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--c) 18%, transparent);
}

.beacon i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 18px var(--c);
}

.beacon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--c);
  opacity: 0;
  animation: ping 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

@keyframes ping {
  0% { transform: scale(0.45); opacity: 0.8; }
  100% { transform: scale(1.35); opacity: 0; }
}

.stale {
  margin: 10px 0 0;
  padding: 10px 14px;
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  color: var(--ink-2);
  font-size: 13px;
}

/* ── notices & ongoing incidents ── */
.notice {
  --c: var(--blue-2);
  margin-top: 14px;
  padding: 14px 18px;
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  border-left: 3px solid var(--c);
  border-radius: 12px;
  background: color-mix(in srgb, var(--c) 8%, var(--surface));
}

.n-warn { --c: var(--warn); }
.n-maintenance { --c: var(--maint); }
.notice b { font-weight: 600; }
.notice p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.notice .when { font-family: var(--f-mono); font-size: 12px; }

.ongoing {
  margin-top: 14px;
  padding: 16px 18px 6px;
  border: 1px solid color-mix(in srgb, var(--crit) 35%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--crit) 7%, var(--surface));
}

.ongoing h2 { margin: 0 0 8px; }

/* ── groups & components ── */
.group {
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.group-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

h2 {
  margin: 0;
  font: 600 13px var(--f-display);
  letter-spacing: 0.04em;
}

.group-head .state { margin-left: auto; }

.comp { padding: 16px 20px 14px; }
.comp + .comp { border-top: 1px solid var(--line); }

.comp-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.comp-head h3 {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.comp-head h3 a { color: var(--ink); }
.comp-head h3 a::after { content: ' ↗'; color: var(--ink-3); font-weight: 400; font-size: 12px; }

.lat {
  margin-left: auto;
  color: var(--ink-3);
  font: 12px var(--f-mono);
  white-space: nowrap;
}

.comp-head .state { margin-left: auto; }
.comp-head .lat + .state { margin-left: 0; }

.state {
  --c: var(--ok);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  color: var(--c);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.state i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px color-mix(in srgb, var(--c) 70%, transparent); }
.s-degraded { --c: var(--minor); }
.s-partial { --c: var(--warn); }
.s-outage { --c: var(--crit); }
.s-unknown { --c: var(--ink-3); }
.s-maintenance { --c: var(--maint); }

/* uptime bars: one per day, oldest left */
.bars {
  display: flex;
  gap: 2px;
  height: 34px;
}

.bars i {
  flex: 1 1 0;
  min-width: 2px;
  border-radius: 3px;
  background: var(--none);
  transition: transform 0.15s, filter 0.15s;
}

.bars i:hover, .bars i.on { transform: scaleY(1.12); filter: brightness(1.2); }
.bars .d-ok { background: var(--ok); }
.bars .d-minor { background: var(--minor); }
.bars .d-warn { background: var(--warn); }
.bars .d-crit { background: var(--crit); }

.bars-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 7px;
  color: var(--ink-3);
  font: 11px var(--f-mono);
}

.bars-foot i { flex: 1; height: 1px; background: var(--line); }
.bars-foot .up { color: var(--ink-2); }
.bars-foot .short { display: none; }

/* ── incidents ── */
.history { margin-top: 34px; }
.history > h2 { margin-bottom: 6px; font-size: 15px; }

.hday { padding: 14px 0; border-bottom: 1px solid var(--line); }
.hday h3 { margin: 0 0 6px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.hday .none { margin: 0; color: var(--ink-3); font-size: 13px; }

.history ul, .ongoing ul { margin: 0; padding: 0; list-style: none; }

.inc {
  --c: var(--warn);
  display: flex;
  gap: 12px;
  padding: 8px 0;
}

.i-crit { --c: var(--crit); }
.inc-mark { flex: none; width: 3px; border-radius: 3px; background: var(--c); }
.inc-title { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.inc-title span { color: var(--c); font-size: 13px; font-weight: 600; }
.inc-meta { color: var(--ink-3); font-size: 12.5px; }
.inc-meta time { font-family: var(--f-mono); font-size: 12px; }
.inc-meta .resolved { color: var(--ok); }
.inc-meta .ongoing { color: var(--crit); font-weight: 600; }

details { margin-top: 14px; }
details summary { cursor: pointer; color: var(--ink-2); font-size: 13px; }
details ul { margin-top: 8px !important; }

/* ── footer ── */
.foot {
  margin-top: 40px;
  color: var(--ink-3);
  font-size: 12.5px;
  text-align: center;
}

.foot p { margin: 4px 0; }

/* tooltip for the bars (public/app.js) */
.tip {
  position: fixed;
  z-index: 10;
  max-width: 240px;
  padding: 8px 11px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--surface-2);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
  color: var(--ink);
  font: 12px/1.5 var(--f-mono);
  white-space: pre-line;
  pointer-events: none;
}

@media (max-width: 640px) {
  .wrap { padding-top: 20px; }
  .top { gap: 10px; margin-bottom: 22px; }
  .logotyp { width: 112px; }
  .mascot { width: 54px; height: 54px; margin: -12px -6px -12px -10px; }
  .top-title { display: none; }
  .banner { padding: 18px; gap: 14px; }
  .group-head, .comp { padding-left: 16px; padding-right: 16px; }
  /* the last 30 days only — 90 bars do not fit a phone */
  .bars i.old { display: none; }
  .bars-foot .long { display: none; }
  .bars-foot .short { display: inline; }
  .lat { display: none; }
  .comp-head .lat + .state { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .beacon::after { animation: none; }
  .bars i { transition: none; }
}

.history > .none { margin: 10px 0 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink-2); font-size: 13.5px; }
