@font-face {
  font-family: "Sora";
  src: url("/fonts/Sora-VariableFont_wght.ttf") format("truetype-variations");
  font-display: swap;
  font-style: normal;
  font-weight: 100 900;
}

:root {
  color-scheme: light;
  --page-bg: #f7f8fa;
  --top-band: #111827;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #74809a;
  --line: #e4e7ec;
  --no-data: #d7dce5;
  --success: #37d673;
  --success-soft: #b6f4cf;
  --warning: #e4a72f;
  --warning-soft: #fff3d8;
  --danger: #e43f4b;
  --danger-soft: #ffe3e6;
  --unknown: #667085;
  --shadow-panel: 0 28px 56px rgba(17, 24, 39, 0.08);
  --radius-panel: 7px;
  --font: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --container: 1528px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(var(--top-band) 0 150px, transparent 150px),
    var(--page-bg);
  color: var(--ink);
  font-family: var(--font);
}

a,
button {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(55, 214, 115, 0.48);
  outline-offset: 3px;
}

:focus:not(:focus-visible) {
  outline: none;
}

.container {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
}

.site-header {
  color: #ffffff;
}

.site-header__inner {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #ffffff;
  font-size: 1.22rem;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1;
  text-decoration: none;
}

.brand img {
  display: block;
  width: 38px;
  height: 58px;
  object-fit: contain;
}

.site-header__label {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
  font-weight: 700;
  padding: 0 12px;
}

.status-hero {
  padding-top: 0;
}

.summary-card,
.service-list,
.summary-metrics,
.updates-card {
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
}

.summary-card {
  display: grid;
  min-height: 276px;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  align-items: center;
  gap: 32px;
  padding: 42px 62px 42px 72px;
}

.summary-card__status {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 48px;
}

.status-indicator {
  display: block;
  width: 94px;
  height: 94px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--unknown);
}

.status-indicator--operational {
  background: var(--success);
}

.status-indicator--maintenance {
  background: var(--warning);
}

.status-indicator--outage {
  background: var(--danger);
}

.status-indicator--unknown {
  background: var(--unknown);
}

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

h1 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(1.85rem, 2vw, 2.4rem);
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1.04;
}

h1 span {
  color: var(--success);
}

h1 span[data-state="maintenance"] {
  color: var(--warning);
}

h1 span[data-state="outage"] {
  color: var(--danger);
}

h1 span[data-state="unknown"] {
  color: var(--unknown);
}

h2 {
  margin-bottom: 0;
  color: var(--ink);
  font-size: clamp(1rem, 2vw, 2rem);
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1.1;
}

h2 span {
  color: var(--muted);
  font-weight: 800;
}

.summary-card__meta {
  justify-self: end;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.15rem, 1.2vw, 1.6rem);
  font-weight: 600;
  line-height: 1.35;
  text-align: right;
  min-width: 50vw;
}

.summary-card__meta a {
  color: var(--success);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.status-section {
  padding: 74px 0 90px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.section-header--compact {
  margin-top: 70px;
}

.calendar-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 10px;
  border: 0;
  background: transparent;
  color: var(--success);
  font-size: 1.2rem;
  font-weight: 560;
  padding: 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.calendar-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.calendar-button__icon {
  position: relative;
  display: inline-block;
  width: 25px;
  height: 25px;
  border: 3px solid currentColor;
  border-radius: 4px;
}

.calendar-button__icon::before,
.calendar-button__icon::after {
  position: absolute;
  top: -7px;
  width: 4px;
  height: 9px;
  border-radius: 2px;
  background: currentColor;
  content: "";
}

.calendar-button__icon::before {
  left: 5px;
}

.calendar-button__icon::after {
  right: 5px;
}

.maintenance-panel {
  margin-bottom: 18px;
  border: 1px solid rgba(228, 167, 47, 0.32);
  border-radius: var(--radius-panel);
  background: var(--warning-soft);
  color: #684600;
  padding: 18px 22px;
}

.maintenance-panel strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 1rem;
}

.maintenance-panel p {
  margin-bottom: 0;
  font-size: 0.94rem;
  line-height: 1.5;
}

.service-list {
  padding: 30px 48px 28px;
}

.service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px 32px;
  padding: 18px 0 40px;
  border-bottom: 1px solid var(--line);
}

.service-row:last-child {
  padding-bottom: 18px;
  border-bottom: 0;
}

.service-details {
  min-width: 0;
}

.service-name {
  margin-bottom: 24px;
  color: #202532;
  font-size: clamp(1.25rem, 1.6vw, 1.74rem);
  font-weight: 470;
  letter-spacing: 0;
  line-height: 1.2;
}

.service-name__arrow,
.service-name__separator {
  color: var(--muted);
}

.service-name__percent {
  color: var(--success);
  font-weight: 450;
}

.service-maintenance {
  margin: 10px 0 0;
  color: #684600;
  font-size: 0.96rem;
  line-height: 1.45;
}

.service-meta {
  display: none;
}

.uptime-ticks {
  display: grid;
  width: min(100%, 1340px);
  grid-template-columns: repeat(90, minmax(4px, 1fr));
  gap: 6px;
}

.uptime-tick {
  display: block;
  height: 48px;
  border-radius: 999px;
  background: var(--success);
}

.uptime-tick--partial {
  background: var(--success-soft);
}

.uptime-tick--down {
  background: var(--danger);
}

.uptime-tick--no-data {
  background: var(--no-data);
}

.calendar-view {
  margin-top: 0;
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: var(--shadow-panel);
  padding: 36px 56px 64px;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 420px) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  margin-bottom: 70px;
}

.calendar-select {
  width: 100%;
  min-height: 66px;
  border: 1px solid rgba(17, 24, 39, 0.32);
  border-radius: 6px;
  background: var(--surface);
  color: #202532;
  font: inherit;
  font-size: 1.45rem;
  font-weight: 430;
  padding: 0 52px 0 22px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 22px;
  color: #202532;
}

.calendar-nav__button {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #202532;
  font-size: 2.2rem;
  font-weight: 430;
  line-height: 1;
  padding: 0;
}

.calendar-nav__button--muted {
  color: rgba(17, 24, 39, 0.38);
}

.calendar-nav__label {
  font-size: 1.72rem;
  font-weight: 470;
  line-height: 1.2;
}

.calendar-months {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 78px;
}

.calendar-month {
  min-width: 0;
}

.calendar-month__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 48px;
}

.calendar-month__header h3 {
  margin: 0;
  color: #202532;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.2;
}

.calendar-month__header span {
  color: var(--success);
  font-size: 1.55rem;
  font-weight: 430;
  line-height: 1.2;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-day {
  position: relative;
  display: block;
  aspect-ratio: 1;
  border-radius: 5px;
  background: var(--success);
}

.calendar-day:focus-visible {
  outline: 3px solid rgba(17, 24, 39, 0.18);
  outline-offset: 2px;
}

.calendar-day::before,
.calendar-day::after {
  position: absolute;
  left: 50%;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 120ms ease;
}

.calendar-day::before {
  bottom: calc(100% + 13px);
  min-width: 158px;
  border-radius: 6px;
  background: var(--top-band);
  color: #ffffff;
  content: attr(data-tooltip-date) "\A" attr(data-tooltip-value);
  font-size: 0.9rem;
  font-weight: 430;
  line-height: 1.45;
  padding: 14px 18px;
  text-align: left;
  white-space: pre;
}

.calendar-day::after {
  bottom: calc(100% + 3px);
  border: 10px solid transparent;
  border-top-color: var(--top-band);
  content: "";
}

.calendar-day:hover::before,
.calendar-day:hover::after,
.calendar-day:focus::before,
.calendar-day:focus::after,
.calendar-day:focus-visible::before,
.calendar-day:focus-visible::after {
  opacity: 1;
}

.calendar-day--partial {
  background: var(--success-soft);
}

.calendar-day--no-data {
  background: #e1e3e6;
}

.calendar-day--empty {
  visibility: hidden;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  align-self: start;
  gap: 16px;
  color: var(--success);
  font-size: clamp(1.22rem, 1.55vw, 1.72rem);
  font-weight: 500;
  line-height: 1.2;
}

.status-badge::before {
  display: inline-block;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.status-badge--maintenance {
  color: var(--warning);
}

.status-badge--outage {
  color: var(--danger);
}

.status-badge--unknown {
  color: var(--unknown);
}

.content-block {
  margin-top: 0;
}

.summary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-height: 270px;
  align-items: center;
  padding: 64px 56px;
}

.summary-metric {
  min-width: 0;
  padding: 8px 56px;
  border-right: 1px solid var(--line);
}

.summary-metric:first-child {
  padding-left: 40px;
}

.summary-metric:last-child {
  border-right: 0;
}

.summary-metric strong {
  display: block;
  color: var(--ink);
  font-size: clamp(1.6rem, 2.2vw, 2.38rem);
  font-weight: 820;
  line-height: 1.1;
}

.summary-metric span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.55vw, 1.7rem);
  font-weight: 430;
}

.updates-card {
  padding: 8px 0;
}

.status-update {
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
}

.status-update:last-child {
  border-bottom: 0;
}

.status-update strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
}

.status-update p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.96rem;
  line-height: 1.5;
}

.empty-state {
  margin: 0;
  padding: 28px;
  color: var(--muted);
}

.feed-meta {
  width: min(var(--container), calc(100% - 48px));
  margin: -48px auto 42px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .summary-card {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 44px;
  }

  .summary-card__meta {
    justify-self: start;
    text-align: left;
  }

  .summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 36px;
  }

  .calendar-toolbar {
    grid-template-columns: 1fr;
    margin-bottom: 42px;
  }

  .calendar-nav {
    justify-content: flex-start;
  }

  .calendar-months {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .summary-metric {
    padding: 28px 32px;
  }

  .summary-metric:nth-child(2) {
    border-right: 0;
  }

  .summary-metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  body {
    background:
      linear-gradient(var(--top-band) 0 118px, transparent 118px),
      var(--page-bg);
  }

  .container,
  .feed-meta {
    width: min(100% - 28px, var(--container));
  }

  .status-hero {
    padding-top: 0;
  }

  .site-header__inner {
    min-height: 72px;
  }

  .brand {
    font-size: 1.05rem;
  }

  .brand img {
    width: 32px;
    height: 48px;
  }

  .site-header__label {
    min-height: 32px;
    font-size: 0.78rem;
  }

  .summary-card {
    gap: 24px;
    padding: 30px 24px;
  }

  .summary-card__status {
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
  }

  .status-indicator {
    width: 72px;
    height: 72px;
  }

  .status-section {
    padding: 48px 0 70px;
  }

  .section-header {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 20px;
  }

  .calendar-button {
    font-size: 1.18rem;
  }

  .service-list {
    padding: 18px 22px;
  }

  .calendar-view {
    padding: 24px 22px 34px;
  }

  .calendar-select {
    min-height: 56px;
    font-size: 1.1rem;
  }

  .calendar-nav {
    gap: 12px;
  }

  .calendar-nav__label {
    font-size: 1.2rem;
  }

  .calendar-nav__button {
    width: 32px;
    height: 32px;
    font-size: 1.8rem;
  }

  .calendar-month__header {
    margin-bottom: 22px;
  }

  .calendar-month__header h3,
  .calendar-month__header span {
    font-size: 1.22rem;
  }

  .service-row {
    grid-template-columns: 1fr;
    gap: 14px;
    padding-bottom: 28px;
  }

  .service-name {
    margin-bottom: 18px;
  }

  .uptime-ticks {
    grid-template-columns: repeat(45, minmax(4px, 1fr));
    gap: 5px;
  }

  .uptime-tick {
    height: 34px;
  }

  .status-badge {
    justify-self: start;
    order: -1;
  }

  .section-header--compact {
    margin-top: 52px;
  }

  .summary-metrics {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 24px;
  }

  .summary-metric,
  .summary-metric:first-child,
  .summary-metric:nth-child(2) {
    padding: 24px 10px;
    border-right: 0;
  }

  .summary-metric:not(:last-child),
  .summary-metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .feed-meta {
    margin-top: -36px;
  }
}

@media (max-width: 420px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.72rem;
  }

  .summary-card__meta {
    font-size: 1rem;
  }

  .uptime-ticks {
    grid-template-columns: repeat(30, minmax(4px, 1fr));
  }
}
