/* status.dialstack.ai. Light theme only. Colours come from the DialStack
   website palette; impact colours are paired with an icon and a label
   everywhere, and partial-outage bars carry stripes, so no state depends on
   hue alone. */

@font-face { font-family: "Poppins"; src: url("/fonts/Poppins-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fonts/Poppins-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fonts/Poppins-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fonts/Poppins-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;

  --plum-electric: #6B2CFF;
  --bubblegum: #FF1593;
  --plum: #1C1247;
  --midnight: #080516;
  --lavender: #F0F0FF;
  --offwhite: #F8F8FF;
  --charcoal: #333333;

  --page: var(--lavender);
  --panel: var(--offwhite);
  --ink: var(--charcoal);
  --ink-strong: var(--plum);
  --ink-soft: #57516F;
  --line: #DEDAF3;
  --line-strong: #8C84B5;

  /* One colour per state, used for every bar, icon and stripe on both the light
     page and the plum hero and popover: each is >= 3:1 against the panel
     (#F8F8FF) and the plum (#1C1247). Text next to it stays ink, since a colour
     that clears 4.5:1 on light fails on plum. The tint is only a chip
     background. */
  --op-text: #5220DB;   /* brand plum for links and buttons, not a state */
  --op-tint: #E8E1FF;
  --ok: #1F9D5A;
  --ok-tint: #DCF4E6;
  --deg: #B07C00;
  --deg-tint: #FFF0C2;
  --par: #E0560B;
  --par-tint: #FFE3D1;
  --maj: #DC2626;
  --maj-tint: #FFDDE6;
  /* partial outage is striped as well as coloured, for colour-blind viewers */
  --par-stripes: repeating-linear-gradient(135deg, var(--par) 0 4px, #F39A66 4px 7px);

  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 10px;
  --focus: 0 0 0 3px var(--offwhite), 0 0 0 5px var(--plum-electric);

  --font: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { color: var(--ink-strong); margin: 0; line-height: 1.25; }
p { margin: 0; }
a { color: var(--op-text); text-underline-offset: 3px; }
a:hover { color: var(--plum); }
:focus { outline: none; }
:focus-visible { box-shadow: var(--focus); border-radius: 6px; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 24px; }

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

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--plum); color: var(--offwhite);
  padding: 10px 16px; border-radius: var(--radius-sm); text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px;
  font: 500 15px/1 var(--font);
  border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn-primary { background: var(--plum-electric); color: var(--offwhite); }
.btn-primary:hover { background: #5A1EEB; color: var(--offwhite); }
.btn-primary:disabled { background: #9C88E0; cursor: progress; }
.btn-ghost { color: var(--plum); border-color: var(--line-strong); background: transparent; }
.btn-ghost:hover { border-color: var(--plum); background: var(--offwhite); color: var(--plum); }
.btn-quiet { color: var(--op-text); background: var(--panel); border-color: var(--line); margin-top: 20px; }
.btn-quiet:hover { border-color: var(--plum-electric); color: var(--plum); }

/* ---------- header ---------- */

.top-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 84px;
}
.brand { display: inline-flex; align-items: center; gap: 0; }
.brand a { text-decoration: none; }
.brand-mark { display: block; border-radius: 6px; }
.brand svg { width: 148px; height: auto; display: block; }
.brand-tag {
  position: relative; margin-left: 28px; padding: 0 3px;
  font-weight: 500; font-size: 17px; color: var(--plum); line-height: 1.2;
}
/* the divider sits outside the link so its focus ring hugs the word */
.brand-tag::before {
  content: ""; position: absolute; left: -14px; top: 0; bottom: 0;
  border-left: 1.5px solid var(--line-strong);
}

/* ---------- hero ---------- */

.hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 40px;
  padding: 48px 56px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 100% 100%, rgba(255, 21, 147, .20), rgba(255, 21, 147, 0) 55%),
    radial-gradient(90% 120% at 85% 0%, rgba(107, 44, 255, .45), rgba(107, 44, 255, 0) 60%),
    var(--plum);
  color: #DCD6F7;
}
.hero h1 {
  color: var(--offwhite);
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.hero-icon {
  width: 52px; height: 52px; margin-bottom: 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(248, 248, 255, .08);
  border: 1.5px solid rgba(248, 248, 255, .18);
  color: var(--ok);
}
.hero-icon:empty { visibility: hidden; }
.hero[data-state="degraded_performance"] .hero-icon { color: var(--deg); }
.hero[data-state="partial_outage"] .hero-icon { color: var(--par); }
.hero[data-state="major_outage"] .hero-icon { color: var(--maj); }
.hero-sub { margin-top: 14px; font-size: 17px; max-width: 34em; color: #E4E0FA; }
.hero-meta { margin-top: 18px; font-size: 13.5px; color: #B9B1E6; min-height: 1.6em; }
.hero-zone { font-size: 13.5px; color: #E4E0FA; font-weight: 500; }

/* the pulse: the seven bars of the DialStack mark in its proportions (measured
   from the website's logo SVG), coloured by the overall state. --mark is the
   centre bar's height; everything else scales from it. */
.pulse {
  --mark: 160px;
  display: flex; align-items: center; gap: calc(var(--mark) * .078);
  height: calc(var(--mark) + 8px); padding-right: 8px;
}
.pulse-bar {
  width: calc(var(--mark) * .066); height: calc(var(--mark) * var(--r, 1)); border-radius: 999px;
  background: linear-gradient(180deg, #B49CFF, var(--plum-electric));
  transform-origin: center;
  animation: rise .7s cubic-bezier(.2, .8, .2, 1) both;
}
.pulse-bar:nth-child(1), .pulse-bar:nth-child(7) { --r: .419; }
.pulse-bar:nth-child(2), .pulse-bar:nth-child(6) { --r: .576; }
.pulse-bar:nth-child(3), .pulse-bar:nth-child(5) { --r: .789; }
.pulse-bar:nth-child(2) { animation-delay: .04s; }
.pulse-bar:nth-child(3) { animation-delay: .08s; }
.pulse-bar:nth-child(4) { animation-delay: .12s; }
.pulse-bar:nth-child(5) { animation-delay: .16s; }
.pulse-bar:nth-child(6) { animation-delay: .20s; }
.pulse-bar:nth-child(7) { animation-delay: .24s; }
.pulse-bar[data-impact="operational"] { background: var(--ok); }
.pulse-bar[data-impact="degraded_performance"] { background: var(--deg); }
.pulse-bar[data-impact="partial_outage"] { background: var(--par-stripes); }
.pulse-bar[data-impact="major_outage"] { background: var(--maj); }
@keyframes rise { from { transform: scaleY(.15); opacity: 0; } to { transform: scaleY(1); opacity: 1; } }

.notice {
  margin-top: 16px; padding: 12px 18px;
  border-radius: var(--radius-sm);
  background: var(--deg-tint); color: var(--ink-strong); font-size: 14.5px;
}

/* ---------- sections ---------- */

main > section { margin-top: 64px; }
main > .hero { margin-top: 8px; }
main > .ongoing { margin-top: 40px; }
main h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.hint { margin-top: 6px; color: var(--ink-soft); font-size: 14px; }

.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--ink-soft); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.swatch { width: 8px; height: 18px; border-radius: 999px; display: inline-block; }

/* ---------- chips and impact colours ---------- */

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px 4px 8px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500; line-height: 1.4; white-space: nowrap;
}
.icon { flex: none; display: block; }

[data-impact="operational"] { --c: var(--ok); --c-fill: var(--ok); --c-tint: var(--ok-tint); }
[data-impact="degraded_performance"] { --c: var(--deg); --c-fill: var(--deg); --c-tint: var(--deg-tint); }
[data-impact="partial_outage"] { --c: var(--par); --c-fill: var(--par-stripes); --c-tint: var(--par-tint); }
[data-impact="major_outage"] { --c: var(--maj); --c-fill: var(--maj); --c-tint: var(--maj-tint); }
[data-impact] .icon { color: var(--c); }

.chip { background: var(--c-tint); color: var(--ink-strong); }
.swatch, .bar { background: var(--c-fill); }

/* ---------- components ---------- */

.component-list {
  list-style: none; margin: 20px 0 0; padding: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.component { padding: 22px 28px 16px; border-top: 1px solid var(--line); }
.component:first-child { border-top: 0; }
.component-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.component-names { min-width: 0; }
.component-name { font-size: 16.5px; font-weight: 500; }
.component-desc { font-size: 14px; color: var(--ink-soft); margin-top: 2px; }
.component-state {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  color: var(--ink-strong); font-weight: 500; font-size: 14.5px; margin-top: 1px;
}

.bars {
  display: flex; gap: 3px; height: 40px; margin-top: 16px;
  border-radius: 8px; cursor: pointer;
  touch-action: manipulation;
}
.bars:focus-visible { box-shadow: 0 0 0 4px var(--panel), 0 0 0 6px var(--plum-electric); }
.bar {
  flex: 1 1 0; min-width: 0; height: 100%;
  border-radius: 999px;
  transform-origin: bottom;
  transition: transform .12s ease, filter .12s ease;
}
.bar:hover, .bar[data-active] { filter: brightness(.82) saturate(1.2); transform: scaleY(1.08); }
.bar[data-active] { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--plum); }
.axis {
  display: flex; justify-content: space-between;
  margin-top: 6px; font-size: 12.5px; color: var(--ink-soft);
}

/* ---------- popover ---------- */

.pop {
  position: absolute; z-index: 20;
  width: max-content; max-width: min(320px, calc(100vw - 16px));
  padding: 14px 16px;
  background: var(--plum); color: #E4E0FA;
  border-radius: 14px;
  box-shadow: 0 18px 40px -12px rgba(8, 5, 22, .55);
  font-size: 14px; line-height: 1.45;
}
.pop[hidden] { display: none; }
.pop::after {
  content: ""; position: absolute; left: var(--arrow-x, 50%);
  width: 12px; height: 12px; margin-left: -6px;
  background: var(--plum); transform: rotate(45deg); border-radius: 2px;
}
.pop[data-side="above"]::after { bottom: -5px; }
.pop[data-side="below"]::after { top: -5px; }
.pop-head { display: flex; flex-direction: column; margin-bottom: 8px; }
.pop-comp { color: #B9B1E6; font-size: 12.5px; }
.pop-day { color: var(--offwhite); font-weight: 600; font-size: 15px; }
.pop-none { display: flex; align-items: center; gap: 8px; color: var(--ok); }
.pop-none span { color: #E4E0FA; }
.pop-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pop-list li { display: flex; gap: 9px; align-items: flex-start; }
.pop-list .icon { margin-top: 2px; }
.pop-item { display: flex; flex-direction: column; min-width: 0; }
.pop-item a { color: var(--offwhite); font-weight: 500; }
.pop-item a:hover { color: var(--offwhite); text-decoration-thickness: 2px; }
.pop-sub { color: #B9B1E6; font-size: 12.5px; }

/* ---------- status posts ---------- */

.ongoing h2 { margin-bottom: 18px; }
.post {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px 28px 22px 34px;
  overflow: hidden;
  scroll-margin-top: 24px;
}
.post::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: var(--c-fill);
}
.post + .post { margin-top: 16px; }
.post-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 16px; flex-wrap: wrap; }
.post-title { font-size: 19px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.post-past .post-title { font-size: 16.5px; }
.post-title a { color: inherit; text-decoration: none; }
.post-title a:hover { text-decoration: underline; text-decoration-color: var(--plum-electric); }
.post-meta { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 2px 18px; color: var(--ink-soft); font-size: 14px; }
.post-components { color: var(--ink); font-weight: 500; }

.post[data-target] { animation: flash 2.4s ease-out 1; border-color: var(--plum-electric); box-shadow: 0 0 0 2px var(--plum-electric); }
@keyframes flash { 0%, 30% { background: var(--op-tint); } 100% { background: var(--panel); } }

.updates { list-style: none; margin: 18px 0 0; padding: 0; }
.update { position: relative; padding: 0 0 18px 26px; }
.update:last-child { padding-bottom: 0; }
.update::before {
  content: ""; position: absolute; left: 4px; top: 8px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--panel); border: 2px solid var(--line-strong);
}
.update::after {
  content: ""; position: absolute; left: 9px; top: 22px; bottom: 2px;
  width: 1.5px; background: var(--line);
}
.update:last-child::after { display: none; }
.update:first-child::before { background: var(--plum-electric); border-color: var(--plum-electric); }
.update[data-state="resolved"]::before { background: var(--ok-tint); border-color: var(--ok); }
.update-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; }
.update-state { font-weight: 600; color: var(--plum); font-size: 15px; }
.update-head time { color: var(--ink-soft); font-size: 13.5px; }
.update-body { margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 68ch; }

.post-past { padding: 20px 24px 18px 30px; }
.post-past .updates { margin-top: 14px; }
.post-past .update-body { font-size: 15px; }

/* ---------- history ---------- */

.month { margin-top: 28px; }
.month-title {
  font-size: 15px; font-weight: 600; color: var(--plum);
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.month-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.month-empty { color: var(--ink-soft); font-size: 14.5px; }
.month .post + .post { margin-top: 12px; }

/* ---------- subscribe ---------- */

.subscribe {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px 48px; align-items: start;
  padding: 36px 40px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.subscribe-copy p { margin-top: 8px; color: var(--ink-soft); max-width: 34em; }
.subscribe-form label { display: block; font-weight: 500; font-size: 14.5px; color: var(--plum); margin-bottom: 8px; }
.field-row { display: flex; gap: 10px; }
.field-row input {
  flex: 1; min-width: 0; height: 48px; padding: 0 16px;
  font: 400 16px var(--font); color: var(--ink);
  background: var(--offwhite);
  border: 1.5px solid var(--line-strong); border-radius: 999px;
}
.field-row input::placeholder { color: #6F6A88; }
.field-row input:focus-visible { border-color: var(--plum-electric); box-shadow: 0 0 0 3px rgba(107, 44, 255, .25); }
.field-row input[aria-invalid="true"] { border-color: var(--maj); }
.field-row .btn { min-height: 48px; }
.form-result { margin-top: 12px; font-size: 14.5px; min-height: 1.6em; }
.form-result[data-kind="success"] { color: var(--op-text); font-weight: 500; }
.form-result[data-kind="error"] { color: var(--maj); font-weight: 500; }
.form-result[data-kind="pending"] { color: var(--ink-soft); }

/* ---------- footer ---------- */

.foot { margin-top: 72px; padding: 28px 0 40px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); }
.foot-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; }
.foot a { margin-left: 16px; }
.foot a:first-child { margin-left: 0; }

/* ---------- single-message pages (confirm, unsubscribe, 404) ---------- */

.solo { min-height: 100vh; display: flex; flex-direction: column; }
.solo main { flex: 1; display: flex; align-items: flex-start; }
.card {
  width: 100%; max-width: 560px; margin: 24px 0 0;
  padding: 40px 40px 36px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.card h1 { font-size: clamp(26px, 4vw, 32px); font-weight: 600; letter-spacing: -0.015em; }
.card p { margin-top: 12px; color: var(--ink-soft); }
.card .btn { margin-top: 24px; }
.card .form-result { margin-top: 16px; }
/* The DialStack mark: seven bars, same proportions as .pulse. */
.card-mark {
  --mark: 44px;
  display: flex; gap: calc(var(--mark) * .078); align-items: center;
  height: var(--mark); margin-bottom: 22px;
}
.card-mark span {
  width: calc(var(--mark) * .066); height: calc(var(--mark) * var(--r, 1));
  border-radius: 999px; background: var(--plum-electric);
}
.card-mark span:nth-child(1), .card-mark span:nth-child(7) { --r: .419; }
.card-mark span:nth-child(2), .card-mark span:nth-child(6) { --r: .576; }
.card-mark span:nth-child(3), .card-mark span:nth-child(5) { --r: .789; }
.card-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.card-actions .btn-ghost { margin-top: 24px; }

.lost { text-align: center; margin: 24px auto 0; }
.lost .card-mark { justify-content: center; }

/* ---------- small screens ---------- */

@media (max-width: 860px) {
  .hero { padding: 40px 36px; gap: 24px; }
  .pulse { --mark: 116px; }
  .subscribe { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .top-inner { min-height: 68px; }
  .brand { gap: 0; }
  .brand svg { width: 118px; }
  .brand-tag { font-size: 15px; margin-left: 20px; }
  .brand-tag::before { left: -10px; }
  .top .btn { min-height: 40px; padding: 0 14px; font-size: 14px; }

  .hero { grid-template-columns: minmax(0, 1fr); padding: 28px 24px 24px; border-radius: 22px; }
  .hero-icon { width: 44px; height: 44px; margin-bottom: 14px; }
  .hero-sub { font-size: 15.5px; }
  .pulse { --mark: 56px; order: -1; padding: 0; margin-bottom: -4px; }
  .hero .hero-icon { display: none; }

  main > section { margin-top: 48px; }
  main h2 { font-size: 21px; }
  .component { padding: 18px 18px 14px; }
  .component-head { flex-direction: column; gap: 6px; }
  .bars { height: 36px; gap: 3px; }
  .post { padding: 20px 18px 18px 24px; }
  .post-past { padding: 18px 16px 16px 22px; }
  .subscribe { padding: 26px 20px; border-radius: 22px; }
  .field-row { flex-direction: column; }
  .field-row .btn { width: 100%; }
  .card { padding: 28px 22px; border-radius: 22px; }
}

.short-label { display: none; }
@media (max-width: 400px) {
  .long-label { display: none; }
  .short-label { display: inline; }
  .brand svg { width: 108px; }
  .top .btn { padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* past posts: collapsed timelines show only the newest update */
.updates[data-collapsed] > .update:not(:first-child) { display: none; }
.updates[data-collapsed] > .update:first-child { padding-bottom: 0; }
.updates[data-collapsed] > .update:first-child::after { display: none; }
.toggle {
  margin: 12px 0 0 26px; padding: 4px 0;
  background: none; border: 0; cursor: pointer;
  font: 500 14px var(--font); color: var(--op-text);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(82, 32, 219, .35);
}
.toggle:hover { color: var(--plum); text-decoration-color: currentColor; }

.card .form-result { min-height: 0; }
.card .form-result:empty { margin-top: 0; }

/* history months: loading, failed, and runs of quiet months */
.month-loading { font-style: normal; }
.month-loading::before {
  content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 10px;
  border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--plum-electric);
  vertical-align: -1px; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.month-failed {
  display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  background: var(--deg-tint); color: var(--ink-strong); font-size: 14.5px;
}
.month-failed .btn { margin-top: 0; min-height: 36px; padding: 0 16px; font-size: 14px; }
.month-quiet .month-title { font-weight: 500; color: var(--ink-soft); }
.btn:disabled { cursor: progress; opacity: .75; }
.brand-tag:hover { color: var(--plum-electric); }
