/* Milonet status page. Colours and type follow the Milonet website and panel:
   cream page, white cards with thin beige lines, ink text, black pill buttons, Inter Tight. */

@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-tight-latin.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: 'Inter Tight';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/inter-tight-latin-ext.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;
}

:root {
  --cream: #f6f3ec;
  --band: #e2eadd;
  --band-2: #ecf0e4;
  --ink: #1b1a17;
  --text: #4a4740;
  --muted: #6b675e;
  --faint: #8f897e;
  --line: #e3ddd0;
  --line-strong: #d6cfc1;
  --card: #ffffff;
  --raised: #fbfaf7;

  --ok: #0b9363;
  --ok-text: #1f6b4c;
  --ok-soft: #d2f5e5;
  --warn: #c47f00;
  --warn-text: #8a5d00;
  --warn-soft: #fff3d1;
  --bad: #d63a2f;
  --bad-text: #b01b17;
  --bad-soft: #fde4e3;
  --maint: #4b6cb7;
  --maint-text: #34508f;
  --maint-soft: #e3eafa;
  --none: #ebe6db;
  --unknown: #b9b2a4;

  --radius-card: 28px;
  --shadow-card: 0 1px 2px rgba(27, 26, 23, 0.04), 0 22px 48px -24px rgba(27, 26, 23, 0.2);
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--ok);
  outline-offset: 2px;
  border-radius: 6px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

/* ---------------------------------------------------------------- frame */

.band {
  position: absolute;
  inset: 0 0 auto;
  height: 300px;
  background:
    radial-gradient(1200px 260px at 50% 0%, rgba(255, 255, 255, 0.55), transparent 70%),
    linear-gradient(180deg, var(--band) 0%, var(--band-2) 100%);
  border-bottom: 1px solid rgba(46, 75, 60, 0.08);
}

.wrap {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 40px 0 44px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}
.brand img {
  display: block;
  height: 36px;
  width: auto;
}
.brand-tag {
  flex: none;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.actions {
  display: flex;
  align-items: center;
  gap: 18px;
}
.report {
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
}
.report:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease;
}
.btn:hover {
  background: #000;
}

.updates {
  position: relative;
}
.updates > summary {
  list-style: none;
}
.updates > summary::-webkit-details-marker {
  display: none;
}
.updates[open] > summary .chev {
  transform: rotate(180deg);
}
.chev {
  flex: none;
  transition: transform 0.15s ease;
}
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  width: 272px;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 40px -12px rgba(27, 26, 23, 0.22);
}
.menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
}
.menu a:hover {
  background: var(--cream);
}
.menu strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}
.menu span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 40px 32px 30px;
}

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 36px 4px 48px;
  font-size: 13px;
  color: var(--muted);
}
.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--ink);
}
.foot-brand img {
  display: block;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
.foot a {
  color: var(--muted);
  text-decoration: none;
}
.foot a:hover {
  color: var(--ink);
}
.tz {
  flex-basis: 100%;
  color: var(--faint);
}

/* ---------------------------------------------------------------- status icons and labels */

.si {
  flex: none;
  display: block;
  color: #fff;
}
.si-bg {
  fill: var(--unknown);
}
.si--ok .si-bg {
  fill: var(--ok);
}
.si--warn .si-bg {
  fill: var(--warn);
}
.si--bad .si-bg {
  fill: var(--bad);
}
.si--maint .si-bg {
  fill: var(--maint);
}

.label {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--muted);
}
.label--ok {
  color: var(--ok-text);
}
.label--warn {
  color: var(--warn-text);
}
.label--bad {
  color: var(--bad-text);
}
.label--maint {
  color: var(--maint-text);
}

/* ---------------------------------------------------------------- home: overall status */

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
}
.hero .si {
  border-radius: 50%;
  box-shadow: 0 0 0 7px var(--none);
}
.hero--ok .si {
  box-shadow: 0 0 0 7px var(--ok-soft);
}
.hero--warn .si {
  box-shadow: 0 0 0 7px var(--warn-soft);
}
.hero--bad .si {
  box-shadow: 0 0 0 7px var(--bad-soft);
}
.hero--maint .si {
  box-shadow: 0 0 0 7px var(--maint-soft);
}
.hero h1 {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.hero-sub {
  margin-top: 14px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- notice rows (open incidents, maintenance) */

.active {
  display: grid;
  gap: 10px;
  margin-top: 30px;
}
.row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--raised);
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease;
}
.row:hover {
  background: #fff;
  border-color: var(--line-strong);
}
.row--bad {
  background: #fff8f7;
  border-color: #f4cfcb;
}
.row--warn {
  background: #fffbf0;
  border-color: #f0dfae;
}
.row-text {
  flex: 1;
  min-width: 0;
}
.row-text strong {
  display: block;
  font-weight: 650;
}
.row-text span {
  display: block;
  font-size: 13.5px;
  color: var(--muted);
}
.go {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
}

.chip {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  line-height: 1;
}
.chip b {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ok-text);
}
.chip span {
  margin-top: 3px;
  font-size: 18px;
  font-weight: 700;
}
.chip--warn b {
  color: var(--warn-text);
}
.chip--bad b {
  color: var(--bad-text);
}
.chip--maint b {
  color: var(--maint-text);
}
.chip--neutral b,
.chip--unknown b {
  color: var(--muted);
}

/* ---------------------------------------------------------------- groups and uptime bars */

.groups {
  display: grid;
  gap: 28px;
  margin-top: 40px;
}

.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.toggle-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  transition: transform 0.15s ease;
}
.toggle[aria-expanded='true'] .toggle-icon {
  transform: rotate(90deg);
}
.g-name {
  font-weight: 650;
}
.g-count {
  color: var(--muted);
  white-space: nowrap;
}
.toggle:hover .g-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.uptime {
  font-size: 14px;
  font-weight: 600;
  color: var(--ok-text);
  white-space: nowrap;
}
.uptime--warn {
  color: var(--warn-text);
}
.uptime--bad {
  color: var(--bad-text);
}

.bars {
  display: flex;
  gap: 2px;
  height: 34px;
}
.bars--sm {
  height: 24px;
}
.c {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 3px;
  background: var(--none);
  transition: opacity 0.12s ease;
}
.c--ok {
  background: var(--ok);
}
.c--warn {
  background: var(--warn);
}
.c--bad {
  background: var(--bad);
}
.c--maint {
  background: var(--maint);
}
.bars:hover .c {
  opacity: 0.55;
}
.bars .c:hover {
  opacity: 1;
}

.group.is-open > .bars {
  display: none;
}
.group-body {
  margin-top: 2px;
  padding: 2px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--raised);
}
.group-body[hidden] {
  display: none;
}
.comps {
  margin: 0;
  padding: 0;
  list-style: none;
}
.comp {
  padding: 16px 0 14px;
}
.comp + .comp {
  border-top: 1px solid var(--line);
}
.comp-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.comp-name {
  flex: 1;
  min-width: 0;
}
.name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.flag {
  flex: none;
  display: block;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(27, 26, 23, 0.12);
}
.desc {
  display: block;
  font-size: 13px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.comp-meta {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ms {
  font-size: 13px;
  color: var(--faint);
}
.comp .bars {
  margin-top: 12px;
}
.comp-foot {
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--muted);
}
.err {
  color: var(--bad-text);
  font-weight: 500;
}

.axis {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.axis-short {
  display: none;
}

/* ---------------------------------------------------------------- notices */

.recent {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.section-head h1,
.section-head h2 {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-head a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.section-head a:hover {
  color: var(--ok-text);
}
.empty {
  padding: 18px 0 4px;
  font-size: 14px;
  color: var(--muted);
}

.notice-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.notice {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  padding: 22px 0;
}
.notice + .notice {
  border-top: 1px solid var(--line);
}
.notice h3 {
  font-size: 16.5px;
  font-weight: 650;
  line-height: 1.35;
}
.notice h3 a {
  text-decoration: none;
}
.notice h3 a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 6px;
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--muted);
}
.dot {
  color: var(--faint);
}
.pill {
  font-weight: 600;
  color: var(--ink);
}
.pill--ok {
  color: var(--ok-text);
}
.pill--warn {
  color: var(--warn-text);
}
.pill--bad {
  color: var(--bad-text);
}
.pill--maint {
  color: var(--maint-text);
}
.pill--unknown {
  color: var(--muted);
}
.body {
  margin-top: 10px;
  max-width: 64ch;
  color: var(--text);
  white-space: pre-line;
}
.posted {
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--faint);
}

.timeline {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.tl {
  position: relative;
  padding: 0 0 18px 22px;
}
.tl::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
}
.tl::after {
  content: '';
  position: absolute;
  left: 5.5px;
  top: 19px;
  bottom: 2px;
  width: 1px;
  background: var(--line);
}
.tl:last-child {
  padding-bottom: 0;
}
.tl:last-child::after {
  display: none;
}
.tl:first-child.tl--ok::before {
  background: var(--ok);
  box-shadow: 0 0 0 3px var(--ok-soft);
}
.tl:first-child.tl--warn::before {
  background: var(--warn);
  box-shadow: 0 0 0 3px var(--warn-soft);
}
.tl:first-child.tl--bad::before {
  background: var(--bad);
  box-shadow: 0 0 0 3px var(--bad-soft);
}
.tl:first-child.tl--maint::before {
  background: var(--maint);
  box-shadow: 0 0 0 3px var(--maint-soft);
}
.tl:first-child.tl--neutral::before,
.tl:first-child.tl--unknown::before {
  background: var(--muted);
}
.tl-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
  font-size: 13.5px;
  color: var(--muted);
}
.tl-head strong {
  color: var(--ink);
  font-weight: 600;
}
.tl-msg {
  margin-top: 2px;
  max-width: 64ch;
  color: var(--text);
  white-space: pre-line;
}

/* ---------------------------------------------------------------- history page */

.card--history {
  padding-top: 30px;
}
.month {
  margin-top: 30px;
}
.month-title {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 17px;
  font-weight: 650;
}
.month-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.month .notice-list {
  margin-top: 4px;
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.pager-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  text-decoration: none;
}
.pager-btn:hover {
  border-color: var(--line-strong);
  background: var(--cream);
}
.pager-btn.is-off {
  opacity: 0.35;
}
.pager-range {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

/* ---------------------------------------------------------------- notice page */

.card--notice {
  padding-top: 28px;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.back:hover {
  color: var(--ink);
}
.notice-hero {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 22px;
}
.notice-hero h1 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.window,
.affected {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 18px;
  font-size: 14px;
  color: var(--text);
}
.window strong,
.affected strong {
  font-weight: 600;
  color: var(--ink);
}
.tag {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--raised);
  font-size: 13px;
}
.card--notice .timeline {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.card--simple {
  text-align: center;
}
.card--simple h1 {
  font-size: 26px;
  font-weight: 600;
}
.card--simple .body {
  margin: 10px auto 22px;
}

/* ---------------------------------------------------------------- tooltip */

.tip {
  position: fixed;
  z-index: 50;
  max-width: 280px;
  padding: 9px 12px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 12.5px;
  line-height: 1.45;
  pointer-events: none;
  box-shadow: 0 12px 28px -10px rgba(27, 26, 23, 0.45);
}
.tip[hidden] {
  display: none;
}
.tip b {
  display: block;
  font-weight: 600;
}
.tip span {
  display: block;
  color: #d9d3c6;
}

/* ---------------------------------------------------------------- phones */

@media (max-width: 640px) {
  .top {
    padding: 22px 0 26px;
  }
  .brand img {
    height: 28px;
  }
  .brand-tag {
    display: none;
  }
  .btn {
    padding: 8px 13px;
    font-size: 13.5px;
  }
  .card {
    padding: 28px 16px 22px;
    border-radius: 22px;
  }
  .hero {
    gap: 12px;
  }
  .hero h1 {
    font-size: 21px;
  }
  .groups {
    margin-top: 30px;
  }
  .group-body {
    padding: 2px 12px;
  }
  .comp-head {
    align-items: flex-start;
  }
  .comp-meta {
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
  }
  .c--old {
    display: none;
  }
  .axis-long {
    display: none;
  }
  .axis-short {
    display: inline;
  }
  .notice {
    gap: 12px;
  }
  .notice-hero h1 {
    font-size: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
