:root {
  color-scheme: light dark;
  --paper: #f9f7f1;
  --ink: #151c28;
  --subtle: #526071;
  --line: #d7dce0;
  --green: #167d65;
  --red: #bd3845;
  --amber: #9c6609;
  --grey: #8793a2;
  --panel: #fff;
  background: var(--paper);
  color: var(--ink);
  font:
    14px/1.65 'PingFang TC',
    'Noto Sans TC',
    system-ui,
    sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #171c24;
    --ink: #edf0f5;
    --subtle: #b2bdca;
    --line: #414b58;
    --green: #53c5a2;
    --red: #f9848e;
    --amber: #e7b45c;
    --grey: #7d8a9b;
    --panel: #202834;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
select {
  font: inherit;
  color: var(--ink);
}
button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}
#uptime-page,
#status-page {
  max-width: 960px;
  padding: 36px 32px 28px;
  margin: 0 auto;
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-size: 25px;
  line-height: 1.4;
  font-weight: 600;
}
h2 {
  font-size: 15px;
  font-weight: 600;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 42px;
}
.brand > a:first-child {
  font-weight: 600;
  text-decoration: none;
}
.brand > span {
  color: var(--subtle);
}
.brand .return {
  margin-left: auto;
  font-size: 12px;
}
.current {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
}
.muted {
  color: var(--subtle);
  font-size: 12px;
}
#freshness {
  margin-top: 8px;
}
.period {
  margin: 30px 0 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.metric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
#core-rate {
  font-size: 28px;
  font-weight: 500;
}
.notice {
  font-size: 12px;
  color: var(--subtle);
  margin-bottom: 20px;
}
.component {
  margin: 0 0 20px;
  min-width: 0;
}
.component-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.component-head strong {
  font-weight: 500;
}
.component-state {
  margin-left: 8px;
  font-size: 12px;
  color: var(--subtle);
}
.component-rate {
  font-variant-numeric: tabular-nums;
}
.timeline-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  overscroll-behavior-x: contain;
}
.days {
  display: flex;
  gap: 2px;
  height: 44px;
  position: relative;
  width: 100%;
}
.day {
  width: var(--day-width, 6px);
  height: 44px;
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
}
.days.animate .day {
  transition:
    width 320ms cubic-bezier(0.2, 0, 0, 1),
    opacity 180ms ease-out;
}
.day.expanded {
  width: 576px;
  height: 68px;
}
.days.has-expanded {
  height: 68px;
}
.days.has-expanded .day:not(.expanded) {
  opacity: 0.4;
}
.day-button {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 8px 0;
}
.day-button:focus-visible {
  outline-offset: -2px;
}
.day-mark {
  display: block;
  height: 28px;
  border-radius: 2px;
}
.pass,
.dot.operational {
  background: var(--green);
}
.fail,
.dot.partial_outage,
.dot.major_outage {
  background: var(--red);
}
.slow,
.dot.degraded,
.dot.confirming,
.dot.recovering {
  background: var(--amber);
}
.unknown,
.dot.unknown {
  background: var(--grey);
}
.day-mark.unknown {
  opacity: 0.5;
}
.day-mark.has-missing {
  background-image: linear-gradient(to top, var(--grey) 0 4px, transparent 4px);
}
.future {
  background: var(--grey);
  opacity: 0.18;
}
.five-line {
  display: flex;
  gap: 0;
  width: 576px;
  height: 28px;
  position: absolute;
  top: 8px;
  left: 0;
  overflow: hidden;
  pointer-events: none;
}
.five-slot {
  display: block;
  flex: 0 0 2px;
  width: 2px;
  height: 28px;
  border: 0;
  border-radius: 0;
}
.five-slot.partial {
  box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--paper) 45%, transparent);
}
.time-axis {
  width: 576px;
  display: flex;
  justify-content: space-between;
  position: absolute;
  left: 0;
  top: 43px;
  font-size: 11px;
  color: var(--subtle);
  pointer-events: none;
}
.zoom-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  font-size: 12px;
  color: var(--subtle);
  margin-top: 6px;
}
.zoom-summary.entering {
  animation: detail-enter 240ms cubic-bezier(0.2, 0, 0, 1);
}
.zoom-actions {
  display: flex;
  gap: 8px;
}
.zoom-summary button,
#more-incidents {
  padding: 6px 12px;
  min-height: 36px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 6px;
}
@keyframes detail-enter {
  from {
    opacity: 0.4;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.range {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--subtle);
  margin-top: 8px;
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 12px;
  color: var(--subtle);
  margin: 18px 0;
}
.legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
.selection {
  margin: 22px 0;
  padding: 16px 0;
  border-block: 1px solid var(--line);
}
.selection label {
  margin-right: 12px;
}
.selection select {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  min-height: 44px;
}
#selected-summary {
  margin-top: 8px;
}
.service-summary {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
  flex-wrap: wrap;
  font-size: 13px;
}
.service-summary strong {
  font-weight: 500;
}
.summary-dot,
.calendar-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.calendar-anchor {
  display: inline-block;
  position: relative;
  vertical-align: middle;
}
.calendar-trigger {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  font-variant-numeric: tabular-nums;
}
.calendar {
  position: absolute;
  z-index: 8;
  top: calc(100% + 8px);
  left: 0;
  width: 336px;
  max-width: calc(100vw - 32px);
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 14px #0002;
}
.calendar-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.calendar button {
  border: 0;
  background: transparent;
  min-height: 44px;
  border-radius: 6px;
  padding: 4px;
}
.calendar-navigation button {
  width: 44px;
  font-size: 22px;
}
.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
}
.calendar-week > span {
  color: var(--subtle);
  font-size: 12px;
  padding-bottom: 6px;
}
.calendar-week button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-variant-numeric: tabular-nums;
}
.calendar button:disabled {
  opacity: 0.35;
}
.calendar-week button[aria-selected='true'] {
  outline: 1px solid var(--green);
  outline-offset: -2px;
}
.calendar button:enabled:hover {
  background: var(--paper);
}
.report-link {
  display: inline-block;
  font-size: 13px;
  margin-top: 12px;
  padding-block: 6px;
}
.reports {
  margin-top: 28px;
}
.reports h2 {
  margin-bottom: 8px;
}
.report-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 12px;
  font-size: 13px;
  padding: 0;
  list-style: none;
}
.report-dates a {
  display: inline-block;
  padding-block: 6px;
}
.report-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 13px;
}
.report-table th,
.report-table td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
}
.report-table th {
  font-weight: 500;
}
.report-content p {
  margin-top: 16px;
}
@media (max-width: 440px) {
  .calendar-anchor {
    position: static;
  }
  .selection {
    position: relative;
  }
  .calendar {
    top: 64px;
  }
  .report-table th,
  .report-table td {
    padding: 10px 4px;
  }
}
.incidents {
  margin-top: 24px;
}
.incident {
  border-left: 2px solid var(--line);
  padding-left: 16px;
  margin: 16px 0 22px;
  scroll-margin-top: 20px;
}
.incident p + p {
  margin-top: 4px;
}
.incident:target {
  border-color: var(--red);
}
#incidents > p {
  margin-top: 16px;
}
details {
  margin-top: 26px;
  font-size: 12px;
  color: var(--subtle);
}
summary {
  cursor: pointer;
}
details p {
  margin-top: 10px;
  max-width: 70ch;
}
footer {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--subtle);
}
#day-tooltip {
  position: fixed;
  z-index: 10;
  max-width: min(360px, calc(100vw - 24px));
  padding: 10px 14px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  box-shadow: 0 4px 14px #0002;
  white-space: pre-line;
  pointer-events: none;
  font-size: 12px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 440px) {
  #uptime-page,
  #status-page {
    padding: 24px 16px;
  }
  h1 {
    font-size: 22px;
  }
  .brand {
    gap: 8px;
    margin-bottom: 28px;
  }
  .brand .return {
    font-size: 11px;
  }
  .days {
    gap: 1px;
  }
  #core-rate {
    font-size: 25px;
  }
  .zoom-summary button {
    min-height: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .days.animate .day {
    transition: none;
  }
  .zoom-summary.entering {
    animation: none;
  }
}
