@font-face {
  font-family: 'Clash Display';
  src: url('/fonts/clash-display-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Clash Display';
  src: url('/fonts/clash-display-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Geist Mono';
  src: url('/fonts/geist-mono-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --frost: #f3f6fb;
  --deep: #0b1538;
  --void: #0c1428;
  --blue: #3558e8;
  --mist: #c8d3e3;
  --rule-dark: #24344d;
  --void-ink: #eaf0f8;
  --void-muted: #91a5bf;
  --muted: #53627a;
  --green: #3fb879;
  --amber: #e5a62f;
  --red: #df5454;
  --max-width: 1400px;
  --font-display: 'Clash Display', 'Arial Black', system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  color: var(--deep);
  background: var(--frost);
  font-family: var(--font-mono);
  font-synthesis: none;
}

*, *::before, *::after {
  box-sizing: border-box;
  border-radius: 0 !important;
  box-shadow: none;
}

html { scroll-behavior: smooth; background: var(--frost); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--frost);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--blue); color: var(--frost); }

a { color: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

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

.skip-link {
  position: absolute;
  top: -5rem;
  left: 1rem;
  z-index: 10;
  padding: .75rem 1rem;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
}

.skip-link:focus { top: 1rem; }

.site-header {
  height: 3.75rem;
  border-bottom: 2px solid var(--deep);
}

.header-inner {
  display: flex;
  align-items: stretch;
  width: min(1400px, 100%);
  height: 100%;
  margin-inline: auto;
}

.brand, .footer-brand {
  display: inline-flex;
  align-items: center;
  width: max-content;
  text-decoration: none;
}

.brand {
  gap: .75rem;
  padding: 1rem 1.25rem;
}

.brand-symbol, .brand-wordmark, .footer-symbol {
  display: block;
  flex: 0 0 auto;
  background: currentColor;
  mask-position: left center;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-position: left center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
}
.brand-symbol, .footer-symbol { mask-image: url('/logo-blue.svg'); -webkit-mask-image: url('/logo-blue.svg'); }
.brand-wordmark { mask-image: url('/resilis-wordmark.svg'); -webkit-mask-image: url('/resilis-wordmark.svg'); }
.brand-symbol { width: 2.125rem; height: 1.625rem; }
.brand-wordmark { width: 3.625rem; height: 1.125rem; }

.status-frame-wrap, .section-heading-light, .history-list {
  width: min(calc(var(--max-width) - 1.5rem), calc(100% - 1.5rem));
  margin-inline: auto;
}

.status-frame-wrap { padding: 1.5rem 0; }

.status-summary {
  padding: 1.25rem;
  border: 1px solid var(--mist);
}

.eyebrow, .section-index, .history-label span, .history-dates {
  font-family: var(--font-mono);
}

.eyebrow, .section-index {
  margin-bottom: .8rem;
  color: var(--blue);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.state-line { display: flex; align-items: center; gap: 1rem; }

.state-line h1 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: -.01em;
  word-spacing: .13em;
  text-transform: uppercase;
}

.state-indicator {
  display: inline-block;
  flex: 0 0 auto;
  width: .82rem;
  height: .82rem;
  border: 1px solid var(--void-muted);
  background: var(--void-muted);
}

.state-line > .state-indicator { width: .75rem; height: .75rem; }
.state-indicator[data-state="operational"] { border-color: var(--green); background: var(--green); }
.state-indicator[data-state="degraded"] { border-color: var(--amber); background: var(--amber); }
.state-indicator[data-state="major_outage"] { border-color: var(--red); background: var(--red); }

.history-section { padding: 4rem 0 4.5rem; background: var(--void); color: var(--void-ink); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.4rem; }
.section-heading h2 { margin-bottom: 0; font-family: var(--font-display); font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 700; line-height: .86; letter-spacing: -.035em; word-spacing: .13em; text-transform: uppercase; text-wrap: balance; }
.section-heading-light .section-index { color: #8ca5ff; }

.history-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .9rem; color: var(--void-muted); font-size: .7rem; }
.history-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.history-legend i { display: inline-block; width: .62rem; height: .62rem; background: var(--void-muted); }
.history-legend i[data-state="operational"] { background: var(--green); }
.history-legend i[data-state="degraded"] { background: var(--amber); }

.history-list { border: 1px solid var(--rule-dark); }
.history-row { display: grid; grid-template-columns: minmax(12rem, 18rem) 1fr; align-items: center; gap: 2rem; padding: 1.4rem; border-bottom: 1px solid var(--rule-dark); }
.history-row:last-child { border-bottom: 0; }
.history-label h3 { margin-bottom: .35rem; font-family: var(--font-display); font-size: 1rem; font-weight: 600; word-spacing: .13em; text-transform: uppercase; }
.history-label span { color: var(--void-muted); font-size: .64rem; }
.history-chart-wrap { position: relative; min-width: 0; }
.history-chart { display: grid; grid-template-columns: repeat(90, minmax(1px, 1fr)); gap: 2px; height: 3.25rem; }
.history-chart:focus-visible { outline: 2px solid #8ca5ff; outline-offset: 4px; }
.history-bar { display: block; min-width: 1px; height: 100%; background: #24324b; }
.history-bar[data-state="operational"] { background: var(--green); }
.history-bar[data-state="degraded"] { background: var(--amber); }
.history-bar[data-state="major_outage"] { background: var(--red); }
.history-dates { display: flex; justify-content: space-between; margin-top: .45rem; color: var(--void-muted); font-size: .58rem; }
.history-tooltip {
  position: absolute;
  z-index: 5;
  top: -.75rem;
  width: min(15rem, calc(100vw - 2rem));
  padding: .75rem;
  border: 1px solid var(--deep);
  background: var(--frost);
  color: var(--deep);
  pointer-events: none;
  transform: translate(-50%, -100%);
}
.history-tooltip[hidden] { display: none; }
.history-tooltip-date { display: block; margin-bottom: .35rem; color: var(--muted); font-size: .65rem; text-transform: uppercase; }
.history-tooltip-title { display: block; font-family: var(--font-display); font-size: .9rem; font-weight: 600; line-height: 1.1; text-transform: uppercase; word-spacing: .1em; }
.history-tooltip-details { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1rem; margin: .65rem 0 0; padding-top: .55rem; border-top: 1px solid var(--mist); font-size: .68rem; }
.history-tooltip-details dt, .history-tooltip-details dd { margin: 0; }
.history-tooltip-details dt { color: var(--muted); }
.history-tooltip-details dd { font-weight: 700; text-align: right; }

.empty-panel { padding: 1.25rem; border: 1px dashed var(--mist); color: var(--muted); font-size: .82rem; line-height: 1.5; }
.empty-panel-dark { border-color: var(--rule-dark); color: var(--void-muted); }

.site-footer { position: relative; margin-top: -2px; border-top: 2px solid var(--deep); }
.footer-inner {
  width: min(calc(var(--max-width) - 1.5rem), calc(100% - 1.5rem));
  margin-inline: auto;
}
.footer-directory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: color-mix(in srgb, var(--mist) 30%, transparent); }
.footer-directory section { padding: 2rem 1.25rem 1.25rem; border-bottom: 1px solid var(--mist); }
.footer-directory section:nth-child(odd) { border-right: 1px solid var(--mist); }
.footer-directory h2 { margin: 0; font-family: var(--font-mono); font-size: 1rem; font-weight: 600; line-height: 1.25; }
.footer-directory ul { margin: 1rem 0 0; padding: 0; list-style: none; }
.footer-directory a { display: flex; align-items: center; min-height: 2.75rem; margin-inline: -.5rem; padding-inline: .5rem; color: var(--muted); font-size: 1rem; line-height: 1.25; text-decoration: none; }
.footer-directory a:hover, .footer-directory a:focus-visible, .footer-directory a:active { background: var(--deep); color: var(--frost); }
.title-block { display: grid; grid-template-columns: repeat(2, 1fr); }
.title-block > div { padding: 1rem 1.25rem; border-bottom: 1px solid var(--mist); }
.title-block > div:nth-child(odd) { border-right: 1px solid var(--mist); }
.title-block span, .title-block strong, .title-block a { display: block; }
.title-block span { color: var(--muted); font-family: var(--font-mono); font-size: .75rem; line-height: 1rem; }
.title-block strong, .title-block a { margin-top: .5rem; font-family: var(--font-display); font-size: 1rem; font-weight: 600; line-height: 1; letter-spacing: -.025em; word-spacing: .13em; text-decoration: none; }
.title-block a { display: inline-flex; align-items: center; gap: .5rem; }
.title-block i { width: .5rem; height: .5rem; background: var(--blue); }
.footer-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.5rem 1.25rem; }
.footer-brand { gap: .75rem; }
.footer-symbol { width: 1.5rem; height: 1.125rem; }
.footer-brand span, .footer-login { font-family: var(--font-mono); font-size: .875rem; line-height: 1.25rem; }
.footer-login { color: var(--muted); text-decoration: none; }
.footer-login:hover { color: var(--blue); }

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

@media (min-width: 640px) {
  .brand { padding-inline: 2rem; border-right: 1px solid var(--mist); }
  .status-frame-wrap, .section-heading-light, .history-list, .footer-inner { width: min(calc(var(--max-width) - 4rem), calc(100% - 4rem)); }
  .footer-directory section { padding-inline: 2rem; }
  .title-block > div { padding-inline: 2rem; }
  .footer-main { padding-inline: 2rem; }
}

@media (min-width: 768px) {
  .footer-directory { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer-directory section:nth-child(odd) { border-right: 0; }
  .footer-directory section:not(:last-child) { border-right: 1px solid var(--mist); }
  .title-block { grid-template-columns: repeat(4, 1fr); }
  .title-block > div:nth-child(odd) { border-right: 0; }
  .title-block > div:not(:last-child) { border-right: 1px solid var(--mist); }
}

@media (max-width: 767px) {
  .state-line { align-items: start; }
  .state-line > .state-indicator { margin-top: .2rem; }
  .section-heading { display: block; }
  .history-legend { justify-content: flex-start; margin-top: 1.25rem; }
  .history-row { grid-template-columns: 1fr; gap: .9rem; }
  .history-chart { gap: 1px; }
}

@media (max-width: 639px) {
  .brand-wordmark { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

@media (forced-colors: active) {
  .state-indicator, .history-bar, .history-legend i { forced-color-adjust: none; }
}
