/* Статус aeda — палітра «Небо», Geologica + Oxanium (цифри). Квадратні лише кнопки. */
@font-face {
  font-family: 'Geologica';
  src: url('/fonts/geologica.woff2') format('woff2');
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: 'Oxanium';
  src: url('/fonts/oxanium-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Geologica Fallback';
  src: local('Arial');
  size-adjust: 108%;
  ascent-override: 90%;
  descent-override: 25%;
  line-gap-override: 0%;
}
:root {
  --sky: #e4edf6;
  --sky-2: #9ec0e2;
  --ink: #1e2b3b;
  --blue: #5b7fa6;
  --mute: #4a5a6e;
  --white: #fff;
  --line: color-mix(in srgb, var(--ink) 12%, transparent);
  --ok: #5b7fa6;
  --deg: #d99a2b;
  --down: #c8443c;
  --maint: #9ec0e2;
  --none: color-mix(in srgb, var(--ink) 14%, var(--sky));
  --font: 'Geologica', 'Geologica Fallback', system-ui, sans-serif;
  --num: 'Oxanium', 'Geologica', system-ui, sans-serif;
  --r-sm: 12px;
  --r: 20px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
body {
  margin: 0;
  background: var(--sky);
  color: var(--ink);
  font: 400 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a {
  color: inherit;
}
a:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
.wrap {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Шапка */
.top {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--sky) 92%, var(--white));
}
.top__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand .logo {
  width: auto;
  height: 26px;
}
.brand span {
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: var(--mute);
  font-weight: 500;
}
.top__link {
  color: var(--mute);
  font-weight: 500;
  text-decoration: none;
}
.top__link:hover {
  color: var(--ink);
}

main.wrap {
  display: grid;
  gap: 20px;
  padding-top: clamp(24px, 5vw, 48px);
  padding-bottom: 56px;
}

/* Загальний стан */
.hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: clamp(22px, 4vw, 32px);
  border-radius: var(--r);
  background: var(--white);
  border-left: 8px solid var(--c, var(--none));
}
.hero--ok {
  --c: var(--ok);
}
.hero--deg {
  --c: var(--deg);
}
.hero--down {
  --c: var(--down);
}
.hero--maint {
  --c: var(--maint);
}
.hero__mark {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: var(--c, var(--none));
  position: relative;
}
.hero--ok .hero__mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: no-repeat center/26px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.hero--down .hero__mark::after,
.hero--deg .hero__mark::after {
  content: '!';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--white);
  font: 600 26px/1 var(--num);
}
.hero h1 {
  font-size: clamp(22px, 4.2vw, 30px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.hero p {
  margin-top: 6px;
  color: var(--mute);
  font-size: 15px;
}
.banner {
  padding: 14px 18px;
  border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--deg) 18%, var(--white));
  font-size: 15px;
}

/* Оголошення */
.notices {
  display: grid;
  gap: 12px;
}
.h2,
.group h2 {
  font-size: 19px;
  font-weight: 700;
}
.group h2 span {
  color: var(--mute);
  font-weight: 400;
  font-size: 15px;
  margin-left: 6px;
}
.notice {
  padding: 20px 22px;
  border-radius: var(--r);
  background: var(--white);
  border-left: 6px solid var(--maint);
}
.notice--incident {
  border-left-color: var(--down);
}
.notice__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: var(--mute);
  font-size: 14px;
}
.notice h3 {
  margin-top: 10px;
  font-size: 18px;
}
.notice__mods {
  margin-top: 4px;
  color: var(--mute);
  font-size: 14px;
}
.updates {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.updates time {
  color: var(--mute);
  font-size: 13px;
}

/* Групи й модулі */
.group {
  padding: clamp(18px, 3.5vw, 28px);
  border-radius: var(--r);
  background: var(--white);
}
.mods {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
.mod {
  padding: 16px 0;
  border-top: 1px solid var(--line);
}
.mod:first-child {
  border-top: 0;
}
.mod__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.mod__name b {
  display: block;
  font-weight: 600;
}
.mod__name span {
  color: var(--mute);
  font-size: 14px;
}
.tag {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
.tag::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--t, var(--none));
}
.tag--ok {
  --t: var(--ok);
  color: var(--blue);
}
.tag--deg {
  --t: var(--deg);
  color: #8a5a07;
}
.tag--down {
  --t: var(--down);
  color: var(--down);
}
.tag--maint {
  --t: var(--maint);
  color: var(--mute);
}
.tag--none {
  color: var(--mute);
}
.bars {
  display: flex;
  gap: 2px;
  height: 30px;
  margin-top: 12px;
}
.b {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 2px;
  background: var(--none);
}
.b--ok {
  background: var(--ok);
}
.b--deg {
  background: var(--deg);
}
.b--down {
  background: var(--down);
}
.b--maint {
  background: var(--maint);
}
.bars .b:hover {
  opacity: 0.7;
}
.mod__foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  color: var(--mute);
  font-size: 13px;
}
.mod__up {
  color: var(--ink);
  font: 600 13px/1.55 var(--num);
}
.mod__ms {
  color: var(--mute);
}
.span30 {
  display: none;
}
@media (max-width: 640px) {
  /* На телефоні — 30 днів, щоб смужки не були дрібними */
  .bars .b:nth-child(-n + 60) {
    display: none;
  }
  .span90,
  .mod__ms {
    display: none;
  }
  .span30 {
    display: inline;
  }
}

.legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0;
  padding: 0 4px;
  list-style: none;
  color: var(--mute);
  font-size: 13px;
}
@media (min-width: 720px) {
  .legend {
    grid-template-columns: repeat(5, auto);
    justify-content: start;
    gap: 8px 28px;
  }
}
.legend li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.legend .b {
  flex: none;
  width: 12px;
  height: 16px;
}

/* Історія */
.events {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.event {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}
.event:first-child {
  border-top: 0;
}
.event__mark {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 3px;
  background: var(--ok);
}
.event__mark--down {
  background: var(--down);
}
.event__mark--maint {
  background: var(--maint);
}
.event b {
  font-weight: 600;
}
.event p {
  color: var(--mute);
  font-size: 14px;
}
.empty {
  margin-top: 10px;
  color: var(--mute);
}
.more {
  margin-top: 14px;
  font-weight: 500;
}

/* Підписка */
.sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: clamp(20px, 3.5vw, 28px);
  border-radius: var(--r);
  background: var(--ink);
  color: var(--sky);
}
.sub h2 {
  font-size: 19px;
}
.sub p {
  margin-top: 4px;
  color: color-mix(in srgb, var(--sky) 75%, transparent);
  font-size: 15px;
}
.sub__actions {
  display: flex;
  gap: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 0;
  background: var(--sky);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover {
  background: var(--white);
}
.btn--ghost {
  background: transparent;
  color: var(--sky);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--sky) 45%, transparent);
}
.btn--ghost:hover {
  background: color-mix(in srgb, var(--sky) 12%, transparent);
}
@media (max-width: 480px) {
  .sub__actions {
    width: 100%;
  }
  .sub__actions .btn:first-child {
    flex: 1;
  }
}

/* Архів */
.crumbs a {
  color: var(--mute);
  text-decoration: none;
  font-weight: 500;
}
.h1 {
  font-size: clamp(26px, 5vw, 36px);
  line-height: 1.15;
}
.uptime {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
}
.uptime th,
.uptime td {
  padding: 10px 0;
  border-top: 1px solid var(--line);
  text-align: left;
  font-weight: 400;
}
.uptime tr:first-child th,
.uptime tr:first-child td {
  border-top: 0;
}
.uptime td {
  text-align: right;
  font: 600 14px var(--num);
}

.foot {
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 14px;
}
.foot__in {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 20px;
  padding-top: 22px;
  padding-bottom: 28px;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.foot a {
  text-decoration: none;
}
.foot a:hover {
  color: var(--ink);
}
@media (prefers-reduced-motion: no-preference) {
  .b {
    transition: opacity 0.15s;
  }
}
