/* status.playstrawberry.net. Tokens from hoststrawberry DESIGN.md (sections 2 to 4); the page follows the system theme. */
@font-face {
  font-family: Outfit;
  src: url('/s/outfit-800.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f5f6f7;
  --surface-2: #eceef0;
  --surface-3: #e2e5e8;
  --line: #e2e5e8;
  --text: #25272a;
  --muted: #56626a;
  --berry: #ce2853;
  --berry-text: #a81f43;
  --amber: #9a6a10;
  --online: #26774a;
  --danger: #a81f43;
  --focus: 0 0 0 3px rgb(206 40 83 / 0.35);

  --font-display: Outfit, sans-serif;
  --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --fs-title: clamp(1.625rem, 2.8vw, 2.1875rem);
  --fs-2xl: 1.3125rem;
  --fs-xl: 1.125rem;
  --fs-lg: 1rem;
  --fs-md: 0.9375rem;
  --fs-sm: 0.875rem;
  --fs-xs: 0.8125rem;
  --r-xs: 4px;
  --r-ctl: 10px;
  --r-card: 12px;
  --r-panel: 14px;
  --r-lg: 16px;
  --r-pill: 999px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 150ms;
  --page-narrow: 760px;
  --gutter: 24px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0d0e11;
    --surface: #17191e;
    --surface-2: #1e2127;
    --surface-3: #262a31;
    --line: #2a2e35;
    --text: #eef0f2;
    --muted: #9aa3aa;
    --berry-text: #ef7d9a;
    --amber: #f0b44c;
    --online: #5ee08f;
    --danger: #ff8a9f;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--fs-md) / 1.5 var(--font-ui);
  font-variant-numeric: tabular-nums;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: rgb(206 40 83 / 0.22);
}

a {
  color: var(--berry-text);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

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

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  text-wrap: balance;
}

.wrap {
  width: 100%;
  max-width: calc(var(--page-narrow) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* The bar across the top: the brand leads home, "Status" beside it. */
.top {
  height: 60px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.top-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--fs-xl);
  white-space: nowrap;
  border-radius: var(--r-ctl);
}

.brand img {
  image-rendering: pixelated;
}

.brand-sub {
  color: var(--muted);
  font-size: var(--fs-lg);
  font-weight: 600;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  line-height: 1.25;
}

/* `main` is also `.wrap`: its side padding comes from there, the space above and below from here. */
main.wrap {
  flex: 1;
  padding-block: 40px 64px;
}

/* The state of everything, first. */
.hero {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.hero h1 {
  font-size: var(--fs-2xl);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.hero .dot {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--online);
}

.hero-degraded .dot,
.hero-stale .dot {
  background: var(--amber);
}

.hero-down .dot {
  background: var(--danger);
}

.hero-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.active {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.lead {
  margin: 32px 0 12px;
  color: var(--muted);
  font-size: var(--fs-sm);
}

/* One box, a row per component, as status pages lay it out. */
.components {
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
}

.row {
  padding: 20px 24px;
}

.row + .row {
  border-top: 1px solid var(--line);
}

.row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.row-head h2 {
  font-size: var(--fs-lg);
  line-height: 1.25;
}

.st {
  flex: none;
  font-size: var(--fs-sm);
  font-weight: 600;
  white-space: nowrap;
}

.st-ok {
  color: var(--online);
}

.st-degraded {
  color: var(--amber);
}

.st-down {
  color: var(--danger);
}

.st-none {
  color: var(--muted);
}

/* The days: whole blocks, like the pixels of the mark. */
.bar {
  display: flex;
  gap: 2px;
  height: 34px;
  border-radius: var(--r-xs);
}

.c {
  flex: 1 1 0;
  min-width: 0;
  background: var(--surface-3);
  transition: opacity var(--dur-fast) var(--ease);
}

.c-ok {
  background: var(--online);
}

.c-minor {
  background: var(--amber);
}

.c-major {
  background: var(--danger);
}

.bar:hover .c,
.bar:focus-visible .c {
  opacity: 0.55;
}

.bar .c.on {
  opacity: 1;
}

.axis {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  color: var(--muted);
  font-size: var(--fs-xs);
  white-space: nowrap;
}

.axis .rule {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.axis .narrow {
  display: none;
}

/* The day card under the pointer. */
.tip {
  position: absolute;
  z-index: 60;
  max-width: min(280px, calc(100vw - 16px));
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-ctl);
  font-size: var(--fs-xs);
  line-height: 1.45;
  pointer-events: none;
}

.tip strong {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 700;
}

.tip span {
  display: block;
  color: var(--muted);
}

/* Incidents. */
.incidents {
  margin-top: 48px;
}

.incidents > h2,
.page-title {
  font-size: var(--fs-2xl);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.page-title {
  font-size: var(--fs-title);
  line-height: 1.15;
}

.day {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.day h3,
.day .h3 {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: var(--fs-md);
  line-height: 1.5;
  margin-bottom: 8px;
}

.quiet {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-sm);
}

.inc + .inc {
  margin-top: 16px;
}

.inc h4 {
  font-size: var(--fs-lg);
  line-height: 1.25;
}

.inc-open h4 {
  color: var(--danger);
}

.inc-active {
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
  background: var(--surface);
}

.tag {
  font-family: var(--font-ui);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.timeline {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-size: var(--fs-sm);
}

.timeline strong {
  font-weight: 700;
}

.timeline span {
  color: var(--text);
}

.timeline time {
  display: block;
  color: var(--muted);
  font-size: var(--fs-xs);
}

.more,
.back {
  margin: 20px 0 0;
  font-size: var(--fs-sm);
  font-weight: 600;
}

.back {
  margin: 0 0 16px;
}

/* Footer: its own band at the bottom: the last check, the languages, the company line. */
.foot {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 24px 0 32px;
  color: var(--muted);
  font-size: var(--fs-xs);
}

.foot p {
  margin: 0;
}

.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 12px 0;
}

.langs a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--r-xs);
}

.langs a:hover {
  color: var(--text);
}

.langs a[aria-current] {
  color: var(--text);
}

@media (max-width: 600px) {
  :root {
    --gutter: 16px;
  }

  main.wrap {
    padding-block: 24px 48px;
  }

  .hero {
    padding: 16px;
  }

  .row {
    padding: 16px;
  }

  /* A phone shows the last 30 days, as status pages do. */
  .bar .c:nth-child(-n + 60) {
    display: none;
  }

  .axis .wide {
    display: none;
  }

  .axis .narrow {
    display: inline;
  }
}

@media (prefers-reduced-motion: reduce) {
  .c {
    transition: none;
  }
}
