/* Demodesk status page and its admin.

   The look follows Demodesk's design system (pretzel): colours, type scale,
   spacing, radii, and the form controls, whose sizes, borders and states are
   taken from pretzel's own component styles. Use the variables below, not raw
   values, and change a control here only together with pretzel. */

@font-face { font-family: Roboto; font-weight: 400; font-display: swap; src: url(fonts/roboto-400.woff2) format("woff2"); }
@font-face { font-family: Roboto; font-weight: 500; font-display: swap; src: url(fonts/roboto-500.woff2) format("woff2"); }
@font-face { font-family: Roboto; font-weight: 700; font-display: swap; src: url(fonts/roboto-700.woff2) format("woff2"); }

:root {
  /* pretzel _color.scss */
  --blue: #0049ff; --blue-088: #1f5fff; --blue-116: #003dd6; --blue-008: #ebf0ff; --blue-016: #d6e2ff;
  --green: #0bd9c4; --green-048: #8aede3; --green-008: #ebfcfa; --green-016: #d8f9f6; --green-148: #067166;
  --amber: #ffab00; --amber-008: #fff8eb; --amber-064: #ffc95c; --amber-148: #855900;
  --red: #f00000; --red-108: #dd0000; --red-116: #ca0000; --red-008: #feebeb;
  --black-100: #212529; --black-088: #343a40; --black-064: #495057; --black-048: #676f77; --black-032: #868e96;
  --black-024: #adb5bd; --black-016: #ced4da; --black-012: #dee2e6; --black-008: #e9ecef; --black-004: #f8f9fa; --white: #fff;
  /* pretzel _typography.scss */
  --font-lg: 24px; --font-md: 18px; --font-sm: 15px; --font-xs: 12px;
  --radius: 4px; --round: 100px;
  /* pretzel _form.scss: the ring every focused control gets */
  --focus-ring: 0 0 0 1.5px var(--white), 0 0 0 3.5px var(--blue);
  /* pretzel _elevation.scss */
  --elevation-001: 0 0 1px 1px rgba(0, 0, 0, .05), 0 1px 2px -2px rgba(0, 0, 0, .06), 0 1px 3px rgba(0, 0, 0, .07);
  --elevation-016: 0 0 2px rgba(0, 0, 0, .24), 0 16px 24px 2px rgba(0, 0, 0, .05), 0 6px 30px 5px rgba(0, 0, 0, .06), 0 8px 10px -5px rgba(0, 0, 0, .1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--black-004); color: var(--black-064);
  font: 400 var(--font-sm)/20px Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: .1px;
}
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
h1, h2, h3 { font-size: inherit; font-weight: inherit; }
ul, ol { list-style: none; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-116); text-decoration: underline; }
:focus { outline: none; }
:focus-visible { box-shadow: var(--focus-ring); border-radius: 2px; }
[hidden] { display: none !important; }
.muted { color: var(--black-048); }
.xs { font-size: var(--font-xs); line-height: 16px; }
.wrap { max-width: 848px; margin: 0 auto; padding-inline: 24px; }
.wrap--wide { max-width: 1128px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 16px; }
.row--between { justify-content: space-between; }
.row--top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }

/* Top bar */
.top { background: var(--white); border-bottom: 1px solid var(--black-012); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--black-100); font-weight: 500; }
.brand:hover { color: var(--black-100); text-decoration: none; }
.brand img { height: 20px; width: auto; display: block; }
.brand span { padding-left: 12px; border-left: 1px solid var(--black-012); color: var(--black-048); white-space: nowrap; }
.langs { font-size: var(--font-xs); color: var(--black-024); white-space: nowrap; }
.langs a { color: var(--black-048); padding: 8px 4px; }
.langs a[aria-current] { color: var(--black-100); font-weight: 500; }

/* Buttons: DDButton md (32px) and sm (24px) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 32px; padding: 6px 16px;
  border: 0; border-radius: var(--radius); background: none; color: var(--black-064);
  font-family: inherit; font-size: var(--font-sm); font-weight: 500; line-height: 20px; letter-spacing: .1px;
  white-space: nowrap; cursor: pointer; user-select: none;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { box-shadow: var(--focus-ring); border-radius: var(--radius); }
.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: var(--blue-088); color: var(--white); }
.btn--primary:active { background: var(--blue-116); }
.btn--secondary { border: 1px solid var(--black-016); background: var(--white); color: var(--blue); }
.btn--secondary:hover { background: var(--black-008); color: var(--blue); }
.btn--secondary:active { background: var(--black-012); }
.btn--ghost:hover { background: var(--black-008); color: var(--black-064); }
.btn--ghost:active { background: var(--black-012); }
.btn--danger { color: var(--red-108); }
.btn--danger:hover { background: var(--red-008); color: var(--red-108); }
.btn--sm { height: 24px; padding: 4px 14px; font-size: var(--font-xs); line-height: 16px; }
.btn--icon { width: 32px; padding: 4px; }
.btn svg { width: 24px; height: 24px; fill: currentColor; }

/* Cards and sections */
main { padding-block: 32px 64px; }
.section { margin-top: 40px; }
.section__title { color: var(--black-100); font-size: var(--font-md); font-weight: 700; line-height: 24px; margin-bottom: 16px; }
.section__link { margin-bottom: 16px; font-weight: 500; }
.card { background: var(--white); border: 1px solid var(--black-012); border-radius: var(--radius); }
.card__body { padding: 24px; }
.card__body--head { padding-bottom: 0; }
.card__body--head .card__title { margin-bottom: 0; }

/* Overall state */
.hero { display: flex; align-items: center; gap: 16px; padding: 24px; border-radius: var(--radius); border: 1px solid transparent; }
.hero h1 { color: var(--black-100); font-size: var(--font-lg); font-weight: 700; line-height: 28px; margin-bottom: 4px; }
.hero--operational { background: var(--green-008); border-color: var(--green); }
.hero--degraded { background: var(--amber-008); border-color: var(--amber); }
.hero--outage { background: var(--red-008); border-color: var(--red); }
.beacon { position: relative; flex: none; width: 16px; height: 16px; border-radius: var(--round); background: var(--green); }
.hero--degraded .beacon { background: var(--amber); }
.hero--outage .beacon { background: var(--red); }
.beacon::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--round); background: inherit;
  animation: beacon 2.4s ease-out infinite;
}
@keyframes beacon { from { transform: scale(1); opacity: .6; } to { transform: scale(3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .beacon::after { animation: none; opacity: 0; } }

/* Pills: DDPill default, info, warning, critical, success */
.pill {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 20px;
  background: var(--black-008); color: var(--black-064); font-size: var(--font-xs); font-weight: 500; line-height: 16px; white-space: nowrap;
}
.tone-info { background: var(--blue-016); color: var(--blue-116); }
.tone-degraded { background: var(--amber-064); color: var(--black-088); }
.tone-outage { background: var(--red-008); color: var(--red-116); }
.tone-resolved { background: var(--green-016); color: var(--green-148); }
/* Admin only: a draft must not pass for a live incident. */
.tone-draft { background: var(--amber-008); color: var(--amber-148); box-shadow: inset 0 0 0 1px var(--amber); }

/* Incidents */
.incident__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--black-012); }
.incident__title { color: var(--black-100); font-weight: 500; }
.incident__title a { color: inherit; }
.updates { padding: 8px 24px; }
.update { display: grid; grid-template-columns: 144px minmax(0, 1fr); gap: 16px; padding: 16px 0; }
.update + .update { border-top: 1px solid var(--black-008); }
.update__stage { color: var(--black-100); font-weight: 500; }
.update__body { line-height: 24px; overflow-wrap: anywhere; }
.update__body strong { font-weight: 700; }
.update__body strong { color: var(--black-100); }

/* Systems */
.group__name { padding: 8px 24px; background: var(--black-004); border-bottom: 1px solid var(--black-012); color: var(--black-048); font-size: var(--font-xs); font-weight: 500; line-height: 16px; }
.group + .group .group__name { border-top: 1px solid var(--black-012); }
.year + .year { margin-top: 24px; }
.year__label { color: var(--black-100); font-size: var(--font-sm); font-weight: 700; line-height: 20px; margin-bottom: 8px; }
.component { display: flex; align-items: center; gap: 24px; padding: 16px 24px; }
.component + .component { border-top: 1px solid var(--black-008); }
.component__name { flex: 1 1 208px; color: var(--black-100); }
.component__state { flex: 0 0 104px; text-align: right; font-size: var(--font-xs); font-weight: 500; }
.health-operational { color: var(--green-148); }
.health-degraded { color: var(--amber-148); }
.health-outage { color: var(--red-116); }
/* One pill per day. Quiet days are pale, so the eye lands on the others. */
.bars { display: flex; flex: 0 0 356px; gap: 4px; height: 24px; }
.bars i { flex: 0 0 8px; border-radius: var(--radius); background: var(--green-048); transition: background-color .15s ease; }
.bars i:hover { background: var(--green); }
.bars i.health-degraded { background: var(--amber); }
.bars i.health-outage { background: var(--red); }
.legend { display: flex; justify-content: space-between; width: 356px; margin: 8px 153px 0 auto; }

/* Lists */
.list__row { display: flex; align-items: center; gap: 16px; padding: 16px 24px; color: inherit; }
.list__row + .list__row { border-top: 1px solid var(--black-008); }
a.list__row { cursor: pointer; transition: background-color .15s ease; }
a.list__row:hover { background: var(--black-004); color: inherit; text-decoration: none; }
a.list__row:focus-visible { box-shadow: inset 0 0 0 2px var(--blue); border-radius: 0; }
.list__date { flex: 0 0 104px; }
.list__title { flex: 1; min-width: 0; color: var(--black-100); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 24px; text-align: center; color: var(--black-048); }

.foot { padding: 24px 0 48px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot a { color: var(--black-048); }

/* Form fields: DDFormLabel, DDFormField lg, DDTextarea lg, DDSelect lg */
.field { display: block; }
.fields > * + * { margin-top: 20px; }
.field__label { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; color: var(--black-100); font-weight: 500; }
.field__help { display: block; margin-top: 4px; color: var(--black-064); font-size: var(--font-xs); line-height: 16px; }
.input, .textarea, .select {
  display: block; width: 100%; border: 1px solid var(--black-012); border-radius: var(--radius); background-color: var(--white);
  color: var(--black-100); font: inherit; letter-spacing: inherit; appearance: none;
  transition: border-color .2s cubic-bezier(.645, .045, .355, 1);
}
.input, .select { height: 44px; padding: 0 12px; }
.textarea { padding: 10px 12px; min-height: 62px; resize: vertical; }
.select {
  padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23495057' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 24px;
}
.input:hover, .textarea:hover, .select:hover { border-color: var(--black-016); }
.input:focus, .textarea:focus, .select:focus { box-shadow: var(--focus-ring); border-radius: var(--radius); }
.input::placeholder, .textarea::placeholder { color: var(--black-032); opacity: 1; }
.input[type="file"] { height: auto; padding: 10px 12px; }

/* DDCheckbox and DDRadio: 20px, 2px border, blue when checked */
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--black-100); cursor: pointer; }
.check input {
  flex: none; width: 20px; height: 20px; margin: 0; border: 2px solid var(--black-012); border-radius: var(--radius);
  background: var(--white) center / 16px no-repeat; appearance: none; cursor: pointer;
}
.check input[type="radio"] { border-radius: 100%; }
.check input:active { border-color: var(--blue); }
.check input:checked { border-color: var(--blue); background-color: var(--blue); }
.check input[type="checkbox"]:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.6' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.check input[type="radio"]:checked { background-image: radial-gradient(circle, var(--white) 0 4px, transparent 4.5px); background-size: 100%; }
.check input:focus-visible { box-shadow: var(--focus-ring); }
.check input:disabled { background-color: var(--black-004); cursor: not-allowed; }
.check input:disabled:checked { border-color: var(--black-016); background-color: var(--black-008); }
.check:has(input:disabled) { color: var(--black-048); cursor: not-allowed; }
.checks { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.check-group { display: grid; grid-template-columns: 120px 1fr; gap: 16px; align-items: baseline; }
.check-group + .check-group { margin-top: 12px; }
.check-group__name { color: var(--black-048); font-size: var(--font-xs); line-height: 16px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.trap { position: absolute; left: -9999px; }
.alert { padding: 12px 16px; border-radius: var(--radius); background: var(--red-008); color: var(--red-116); }
.alert--ok { background: var(--green-008); color: var(--green-148); }
.alert--draft { display: flex; align-items: center; gap: 16px; background: var(--amber-008); color: var(--black-088); border: 1px solid var(--amber); margin-bottom: 24px; }
.alert--draft strong { color: var(--black-100); font-weight: 500; }
main > .alert { margin-bottom: 24px; }
.code { display: block; padding: 12px 16px; border-radius: var(--radius); background: var(--black-004); border: 1px solid var(--black-012); color: var(--black-100); font: 13px/20px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
/* Formatting buttons the admin script puts above a text box. */
.format-bar { display: flex; gap: 4px; margin-bottom: 4px; }
.format-bar .btn { width: 24px; padding: 0; color: var(--black-064); }
.format-bar .btn[data-wrap="*"] { font-style: italic; font-weight: 400; }

/* Tabs: DDTabGroup type "secondary", the one the product uses. Text tabs,
   a blue bar under the chosen one, a line under the group. */
.tabs { display: flex; margin-bottom: 16px; border-bottom: 1px solid var(--black-012); }
.tab {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  border: 0; background: none; color: var(--black-048);
  font-family: inherit; font-size: var(--font-sm); font-weight: 500; line-height: 24px; letter-spacing: .1px; cursor: pointer; user-select: none;
}
.tab:hover, .tab[aria-selected="true"] { color: var(--blue); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--blue); }
.tab:focus-visible { border-radius: var(--radius); }
.tabs--full .tab { flex: 1; }
/* A tab group with its body, framed like the product's translation boxes,
   so it is plain which fields change with the tab. */
.tabbox { border-radius: var(--radius); box-shadow: var(--elevation-001); }
.tabbox__head { padding: 0 6px; border-bottom: 1px solid var(--black-008); }
.tabbox__head .tabs { margin-bottom: 0; border-bottom: 0; }
.tabbox__head .tab[aria-selected="true"]::after { bottom: -1px; }
.tabbox__body { padding: 16px 24px 24px; }

/* Subscribe dialog */
.modal { width: min(480px, calc(100vw - 32px)); padding: 24px; border: 0; outline: none; border-radius: var(--radius); color: var(--black-064); box-shadow: var(--elevation-016); }
.modal::backdrop { background: rgba(33, 37, 41, .48); }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.modal__title { color: var(--black-100); font-size: var(--font-md); font-weight: 700; line-height: 24px; }
.steps { counter-reset: step; }
.steps li { position: relative; padding-left: 32px; counter-increment: step; }
.steps li + li { margin-top: 8px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: var(--round); background: var(--black-008); color: var(--black-100); font-size: var(--font-xs); font-weight: 500; text-align: center; }
.panel > * + * { margin-top: 12px; }
.copy { display: flex; align-items: center; gap: 8px; }
.copy .code { flex: 1; padding: 5px 12px; }
/* Without the script every way to subscribe is listed on its own page. */
.panel__name { display: none; color: var(--black-100); font-weight: 700; }
.no-js .tabs { display: none; }
.no-js .panel + .panel { margin-top: 32px; }
.no-js .panel__name { display: block; }
.statement { max-width: 480px; margin: 64px auto 0; padding: 32px; text-align: center; }
.statement h1 { color: var(--black-100); font-size: var(--font-lg); font-weight: 700; line-height: 28px; margin-bottom: 8px; }
.statement form, .statement .btn { margin-top: 24px; }

/* Admin */
.nav { display: flex; gap: 24px; align-self: stretch; }
.nav a { position: relative; display: flex; align-items: center; color: var(--black-048); font-weight: 500; white-space: nowrap; }
.nav a:hover, .nav a[aria-current] { color: var(--blue); text-decoration: none; }
.nav a[aria-current]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--blue); }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-head h1 { color: var(--black-100); font-size: var(--font-lg); font-weight: 700; line-height: 28px; margin-bottom: 4px; overflow-wrap: anywhere; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.aside { position: sticky; top: 24px; }
.card__title { color: var(--black-100); font-size: var(--font-md); font-weight: 700; line-height: 24px; margin-bottom: 16px; }
/* What belongs to the control above it: indented and framed. */
.sub { margin-left: 28px; padding: 16px; border: 1px solid var(--black-012); border-radius: var(--radius); }
.sub--flush { margin: 16px 0 0; }
.actions { display: flex; align-items: center; gap: 8px; }
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 8px 16px; background: var(--black-004); border-bottom: 1px solid var(--black-012); color: var(--black-048); font-size: var(--font-xs); font-weight: 500; line-height: 16px; text-align: left; white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--black-008); vertical-align: middle; overflow-wrap: anywhere; }
.table tr:last-child td { border-bottom: 0; }
.table td.tight { white-space: nowrap; width: 1%; }
/* The banner as the product draws it. */

@media (max-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr); }
  .aside { position: static; }
  .nav { gap: 16px; overflow-x: auto; }
}
@media (max-width: 720px) {
  .wrap { padding-inline: 16px; }
  .bars { flex-basis: 176px; }
  .bars i:nth-last-child(n + 16) { display: none; }
  .component { gap: 16px; padding: 16px; }
  .component__name { flex-basis: 136px; }
  .component__state { flex-basis: 88px; }
  .legend { display: none; }
  .update { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .list__date { display: none; }
  .pair, .check-group { grid-template-columns: minmax(0, 1fr); }
  .check-group { gap: 8px; }
}
@media (max-width: 480px) {
  .bars { display: none; }
  .component__name { flex: 1; }
  .group__name { padding-inline: 16px; }
  .brand span { display: none; }
  .brand img { height: 16px; }
  .top .row { gap: 8px; }
  .top .btn { padding-inline: 10px; }
}
