/* The status page, in the look of skarica.eu's ink pages: the same ground,
   rules and three faces. Everything is one stylesheet; the page allows no
   inline style and no script. */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces Display";
  src: url("fonts/fraunces-display.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces Display";
  src: url("fonts/fraunces-display-italic.woff2") format("woff2");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}
/* One weight, ASCII and the Croatian letters only: a middle dot or an arrow
   inside mono text is set in Inter (.dot) or drawn (svg.out). */
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #15140f;
  --paper: #f3f1ea;
  --muted: #a8a192; /* 7.2:1 on ink */
  --rule: #3a3934;
  --build: #d08a74; /* clay, 6.6:1 */
  --secure: #7fb7d6; /* sea blue, 8.5:1 */
  --up: #8fcf9f; /* 10.2:1 */
  --part: #e0b060; /* 9.3:1 */
  --down: #f08a7a; /* 7.6:1 */
  --sans: "Inter", system-ui, sans-serif;
  --display: "Fraunces Display", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
p,
ul {
  margin: 0;
  padding: 0;
}
ul {
  list-style: none;
}
a {
  color: inherit;
  text-decoration-color: var(--rule);
  text-underline-offset: 4px;
  transition: color 150ms, text-decoration-color 150ms;
}
a:hover {
  color: var(--build);
  text-decoration-color: currentColor;
}
:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}
@media (min-width: 768px) {
  .wrap {
    padding-inline: 2.5rem;
  }
}
@media (min-width: 1024px) {
  .wrap {
    padding-inline: 4rem;
  }
}

.skip {
  position: absolute;
  left: -200vw;
}
.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 1;
  background: var(--paper);
  color: var(--ink);
  padding: 0.5rem 0.75rem;
}

/* Small mono capitals: every label on the page. */
.label {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-variant-ligatures: none;
}
.dot {
  font-family: var(--sans);
}
.quiet {
  color: var(--muted);
  max-width: 60ch;
}
svg.out {
  flex: none;
  margin-left: 0.35em;
}

/* Header: where you are, and the other language. */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.5rem;
  font-family: var(--mono);
  font-size: 13px;
  font-variant-ligatures: none;
  color: var(--muted);
}
header a {
  display: inline-block;
  padding-block: 0.85rem;
  text-decoration: none;
}
header a:hover {
  color: var(--paper);
}
.crumb .here,
.lang [aria-current] {
  color: var(--paper);
}
.lang a {
  padding-inline: 0.85rem;
  margin-inline: -0.85rem;
}

main > section {
  border-top: 1px solid var(--rule);
  padding-block: 2.5rem;
}
@media (min-width: 768px) {
  main > section {
    padding-block: 3.5rem;
  }
}
main > section > .label {
  margin-bottom: 1.25rem;
}

/* Now: the one sentence that matters. */
.now h1 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(38px, 7vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.now.s-up h1 {
  color: var(--up);
}
.now.s-down h1 {
  color: var(--down);
}
.now .lede {
  margin-top: 1rem;
  font-size: 17px;
  color: var(--muted);
}
.now .label {
  min-height: 18px;
}

/* Uptime: one row per address. */
.services {
  border-top: 1px solid var(--rule);
}
.svc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 1rem;
  align-items: baseline;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 2rem;
}
.svc-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
  text-decoration: none;
  padding-block: 0.35rem;
}
.svc-host {
  flex-basis: 100%;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--muted);
  font-variant-ligatures: none;
}
.svc-state,
.svc-ms,
.svc-pct,
.prj-status,
.prj-date,
.door-count {
  font-family: var(--mono);
  font-variant-ligatures: none;
}
.svc-state {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: right;
  white-space: nowrap;
}
.lamp {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.6em;
  background: var(--rule);
}
.s-up .lamp {
  background: var(--up);
}
.s-down .lamp {
  background: var(--down);
}
.svc-state.s-up {
  color: var(--up);
}
.svc-state.s-down {
  color: var(--down);
  white-space: normal;
}
.svc-state.s-none {
  color: var(--muted);
}
.svc-ms,
.svc-pct {
  font-size: 13px;
  color: var(--muted);
}
.svc-pct {
  text-align: right;
  color: var(--paper);
}
.bars {
  grid-column: 1 / -1;
  display: flex;
  gap: 2px;
  height: 26px;
  margin-top: 0.4rem;
}
.bars i {
  flex: 1;
  min-width: 2px;
  background: var(--rule);
}
.bars .c-up {
  background: var(--up);
}
.bars .c-partial {
  background: var(--part);
}
.bars .c-down {
  background: var(--down);
}
.scale {
  display: flex;
  justify-content: space-between;
  margin-top: 0.6rem;
  font-size: 12px;
  color: var(--muted);
}
@media (min-width: 900px) {
  .svc {
    grid-template-columns: minmax(0, 250px) 150px 80px 84px minmax(0, 1fr);
    gap: 0 1.75rem;
    align-items: center;
    padding-block: 1.25rem;
  }
  .svc-state {
    text-align: left;
  }
  .svc-ms {
    text-align: right;
  }
  .bars {
    grid-column: auto;
    margin-top: 0;
  }
  .scale {
    margin-left: calc(250px + 150px + 80px + 84px + 4 * 1.75rem);
  }
}

/* Incidents. */
.incidents li {
  padding-block: 0.85rem;
  border-bottom: 1px solid var(--rule);
  max-width: 80ch;
}
.incidents li:first-child {
  border-top: 1px solid var(--rule);
}
.incidents .open {
  color: var(--down);
}

/* Projects, behind their two doors. */
.projects > .quiet {
  margin-bottom: 0.5rem;
}
.door {
  padding-top: 2.25rem;
}
.door h3 {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
  font-weight: 400;
}
.door-word {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(34px, 5vw, 44px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.d-secure .door-word {
  color: var(--secure);
  font-style: italic;
}
.d-build .door-word {
  color: var(--build);
}
.door-count {
  font-size: 13px;
  color: var(--muted);
}
.prj {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-block: 1.15rem;
  border-bottom: 1px solid var(--rule);
  scroll-margin-top: 2rem;
}
.prj-name {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
}
.prj-name a {
  display: inline-flex;
  align-items: baseline;
  padding-block: 0.6rem;
  text-decoration: none;
}
.d-secure .prj-name a:hover {
  color: var(--secure);
}
.prj-line {
  color: var(--muted);
}
.prj-latest {
  display: block;
  margin-top: 0.4rem;
  font-size: 14px;
}
.prj-date {
  font-size: 12.5px;
  margin-right: 0.5em;
}
.prj-status {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* Work that is not built yet reads quieter than what is. */
.p-planned .prj-name,
.p-planned .prj-status {
  color: var(--muted);
}
@media (min-width: 900px) {
  .prj {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) 220px;
    gap: 0 1.75rem;
    align-items: baseline;
    padding-block: 1.35rem;
  }
  .prj-status {
    text-align: right;
  }
}

footer {
  border-top: 1px solid var(--rule);
  padding-block: 2.5rem 3.5rem;
  color: var(--muted);
}
footer .label {
  margin-bottom: 1rem;
}
footer p {
  max-width: 76ch;
  font-size: 15px;
  line-height: 1.6;
}
footer a {
  color: var(--paper);
}
footer .meta {
  margin-top: 2rem;
  font-size: 12px;
  letter-spacing: 0.02em;
}
