:root {
  color-scheme: light;
  --background: #fbf9f5;
  --text: #20272c;
  --muted: #62686d;
  --border: #d8d2ca;
  --green: #14784a;
  --green-soft: #dcebe1;
  --amber: #a76b00;
  --amber-soft: #f8e8bb;
  --red: #ad3a2e;
  --red-soft: #f5ddd8;
  --neutral: #62686d;
  --neutral-soft: #e6e4df;
  --focus: #005f83;
  --content-width: 48rem;
  --header-width: 73.75rem;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html {
  background: var(--background);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-width: 20rem;
  min-height: 100vh;
  margin: 0;
  background: var(--background);
}

a {
  color: #073c55;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.6rem 0.8rem;
  transform: translateY(-160%);
  background: var(--text);
  color: #fff;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--border);
}

.header-inner {
  width: min(calc(100% - 3rem), var(--header-width));
  min-height: 4.75rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 720;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.header-link {
  font-size: 1rem;
  font-weight: 520;
}

.status-main {
  width: min(calc(100% - 3rem), var(--content-width));
  min-height: calc(100vh - 9.75rem);
  margin: 0 auto;
}

.hero {
  padding: 3.5rem 0 3.75rem;
  text-align: center;
}

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

h1 {
  margin-bottom: 1.3rem;
  font-size: clamp(2.2rem, 4vw, 2.8rem);
  font-weight: 720;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.overall-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  font-size: 1.38rem;
  font-weight: 650;
  line-height: 1.25;
}

.overall-message {
  max-width: 36rem;
  margin: 0.85rem auto 0;
  color: var(--muted);
  font-size: 1rem;
}

.updated-time {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.status-icon {
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: currentColor;
  color: var(--neutral);
}

.status-icon svg {
  width: 62%;
  height: 62%;
  overflow: visible;
  color: #fff;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.status-icon-large {
  width: 2.45rem;
  height: 2.45rem;
}

.status-operational,
.status-operational .status-icon,
.status-operational .component-marker {
  color: var(--green);
}

.status-degraded,
.status-degraded .status-icon,
.status-degraded .component-marker {
  color: var(--amber);
}

.status-outage,
.status-outage .status-icon,
.status-outage .component-marker {
  color: var(--red);
}

.status-maintenance,
.status-maintenance .status-icon,
.status-maintenance .component-marker {
  color: var(--amber);
}

.status-unknown,
.status-unknown .status-icon,
.status-unknown .component-marker {
  color: var(--neutral);
}

.section {
  margin-top: 0.25rem;
}

.section + .section {
  margin-top: 2.95rem;
}

.section h2 {
  margin-bottom: 0.85rem;
  font-size: 1.3rem;
  font-weight: 680;
  letter-spacing: -0.015em;
  line-height: 1.25;
}

.component-list,
.incident-list {
  border-top: 1px solid var(--border);
}

.component-row {
  min-height: 5.7rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr) minmax(11.5rem, auto);
  align-items: center;
  column-gap: 0.95rem;
}

.component-marker {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: currentColor;
  position: relative;
}

.component-marker::after {
  content: "";
  position: absolute;
  top: 0.43rem;
  left: 0.48rem;
  width: 0.62rem;
  height: 0.35rem;
  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  transform: rotate(-45deg);
}

.status-degraded .component-marker::after,
.status-outage .component-marker::after,
.status-maintenance .component-marker::after,
.status-unknown .component-marker::after {
  top: 0.38rem;
  left: 0.79rem;
  width: 0;
  height: 0.62rem;
  border: 0;
  border-left: 2px solid #fff;
  transform: none;
  box-shadow: 0 0.82rem 0 -0.25rem #fff;
}

.component-copy h3 {
  margin-bottom: 0.15rem;
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 650;
  line-height: 1.3;
}

.component-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.component-checked-mobile {
  display: none;
}

.component-state {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.1rem;
  font-size: 1rem;
  font-weight: 630;
}

.component-state .component-checked {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

.component-state-icon {
  display: none;
}

.incident-section {
  padding-bottom: 5.5rem;
}

.incident-card {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  column-gap: 1rem;
}

.incident-dot {
  width: 0.72rem;
  height: 0.72rem;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: var(--amber);
}

.incident-card[data-impact="outage"] .incident-dot {
  background: var(--red);
}

.incident-card[data-impact="none"] .incident-dot,
.incident-card[data-kind="maintenance"] .incident-dot {
  background: var(--green);
}

.incident-heading-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem 0.85rem;
}

.incident-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 1.06rem;
  font-weight: 670;
  line-height: 1.35;
}

.incident-phase {
  padding: 0.14rem 0.45rem;
  border-radius: 0.3rem;
  background: var(--amber-soft);
  color: #684300;
  font-size: 0.78rem;
  font-weight: 650;
}

.incident-card[data-impact="outage"] .incident-phase {
  background: var(--red-soft);
  color: #76261f;
}

.incident-card[data-impact="none"] .incident-phase,
.incident-card[data-kind="maintenance"] .incident-phase {
  background: var(--green-soft);
  color: #225e3e;
}

.incident-time {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.incident-summary {
  max-width: 42rem;
  margin: 0.45rem 0 0;
  color: var(--text);
  font-size: 0.95rem;
}

.empty-state {
  margin: 0;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
}

.site-footer {
  min-height: 5rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
}

.noscript-message {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 5;
  max-width: 42rem;
  margin: auto;
  padding: 0.8rem 1rem;
  border: 1px solid var(--red);
  background: var(--red-soft);
  color: #76261f;
  text-align: center;
}

.history-main {
  padding-bottom: 5.5rem;
}

.history-hero {
  padding: 3.75rem 0 2.2rem;
}

.history-hero h1 {
  margin-bottom: 0.75rem;
}

.history-hero p {
  max-width: 38rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.history-list .incident-card:first-child {
  padding-top: 1.5rem;
}

.load-more {
  min-height: 2.75rem;
  margin-top: 1.5rem;
  padding: 0.6rem 1rem;
  border: 1px solid var(--text);
  border-radius: 0.2rem;
  background: transparent;
  color: var(--text);
  font: 650 0.92rem/1.2 var(--font);
  cursor: pointer;
}

.load-more:hover {
  background: var(--text);
  color: #fff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 39.99rem) {
  .header-inner,
  .status-main {
    width: min(calc(100% - 2.5rem), var(--content-width));
  }

  .header-inner {
    min-height: 5rem;
    gap: 1rem;
  }

  .brand {
    font-size: 1.35rem;
  }

  .header-link {
    font-size: 0.94rem;
    white-space: nowrap;
  }

  .hero {
    padding: 4.4rem 0 3.6rem;
    text-align: left;
  }

  h1 {
    margin-bottom: 1.85rem;
    font-size: clamp(2rem, 9vw, 2.35rem);
  }

  .overall-status {
    justify-content: flex-start;
    gap: 0.9rem;
    font-size: 1.25rem;
  }

  .overall-message {
    margin: 1rem 0 0;
  }

  .updated-time {
    margin-top: 1.6rem;
    font-size: 1rem;
  }

  .section + .section {
    margin-top: 4.2rem;
  }

  .section h2 {
    margin-bottom: 1.1rem;
    font-size: 1.32rem;
  }

  .component-row {
    min-height: 7.9rem;
    padding: 1.55rem 0;
    grid-template-columns: 1.1rem minmax(0, 1fr) minmax(7.5rem, auto);
    column-gap: 0.8rem;
  }

  .component-marker {
    width: 0.62rem;
    height: 0.62rem;
  }

  .component-marker::after,
  .status-degraded .component-marker::after,
  .status-outage .component-marker::after,
  .status-maintenance .component-marker::after,
  .status-unknown .component-marker::after {
    display: none;
  }

  .component-copy h3 {
    font-size: 1.08rem;
  }

  .component-copy p {
    margin-top: 0.2rem;
    font-size: 0.88rem;
  }

  .component-checked-mobile {
    display: block;
  }

  .component-checked-desktop {
    display: none;
  }

  .component-state {
    flex-direction: row;
    justify-content: flex-end;
    gap: 0.5rem;
    font-size: 0.95rem;
    text-align: right;
  }

  .component-state-icon {
    display: inline-grid;
    width: 1.7rem;
    height: 1.7rem;
  }

  .incident-section {
    padding-bottom: 5rem;
  }

  .incident-card {
    padding: 1.7rem 0;
    column-gap: 0.85rem;
  }

  .incident-heading-line {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.65rem;
  }

  .incident-card h3 {
    font-size: 1.08rem;
  }

  .incident-time {
    margin-top: 0.65rem;
  }

  .incident-summary {
    margin-top: 0.65rem;
  }

  .site-footer {
    padding: 1.5rem 1.25rem;
    flex-direction: column;
  }

  .history-hero {
    padding: 4rem 0 2.5rem;
  }
}

@media (max-width: 23rem) {
  .header-inner,
  .status-main {
    width: calc(100% - 2rem);
  }

  .component-row {
    grid-template-columns: 0.85rem minmax(0, 1fr);
  }

  .component-state {
    grid-column: 2;
    margin-top: 0.75rem;
    justify-content: flex-start;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
