/* Totality Status, public page (DESIGN.md).
   A classic one-column status page in the Totality website's clothes: white
   page, white header, navy headings, 4px corners, hairlines instead of cards,
   two font weights, no shadows except the bar tooltip and subscribe panel.

   Type: the website uses Circular Std. Until its files are supplied for this
   hostname, DM Sans (SIL OFL, self-hosted) stands in. Add Circular Std
   @font-face rules here and it takes over with no other change. */

@font-face { font-family: 'DM Sans'; src: url('/fonts/dm-sans-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('/fonts/dm-sans-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  color-scheme: light;

  --bg: #ffffff;
  --ground: #f6f8fb;
  --line: #e2e6ec;
  --navy: #2b3a5a;
  --text: #494b50;
  --muted: #69727d;
  --link: #1255ba;
  --brand: #3e8af6;
  --deep: #0a3f8a;
  --nav: #3c3f40;

  --ok: #1a7f37;
  --ok-fill: #2da44e;
  --degraded: #7d5700;
  --degraded-fill: #bf8700;
  --degraded-banner: #f2c037;
  --on-amber: #1e2b46;
  --partial: #a84300;
  --partial-fill: #d9630b;
  --partial-banner: #b34a00;
  --major: #c62828;
  --maint: #57606a;
  --nodata: #c3cbd6;

  --body: 'Circular Std Book', 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  --head: 'Circular Std', 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
  --pop: 0 2px 8px rgba(30, 43, 70, 0.12);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/24px var(--body);
  font-variant-numeric: tabular-nums;
}
h1, h2, h3 { font-family: var(--head); font-weight: 700; color: var(--navy); margin: 0; }
strong { font-weight: 700; }
a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
p { margin: 0; }
.muted { color: var(--muted); }
.meta { color: var(--muted); font-size: 14px; line-height: 20px; }

.wrap { max-width: 928px; margin: 0 auto; padding: 0 24px; }
main.wrap { padding-top: 40px; }

/* Header: the website's, condensed */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-inner { display: flex; align-items: center; min-height: 70px; gap: 16px; }
.brand { display: block; line-height: 0; }
.brand img { height: 48px; width: auto; }
.divider { width: 1px; height: 24px; background: var(--line); }
.product { color: var(--text); }
.header-nav { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.header-nav > a { color: var(--nav); text-decoration: none; }
.header-nav > a:hover { text-decoration: underline; color: var(--nav); }

/* Subscribe: a native <details>, styled as the website's header button */
.subscribe { position: relative; }
.subscribe summary {
  list-style: none; cursor: pointer; background: var(--deep); color: #fff;
  font-size: 15px; line-height: 22px; padding: 10px 15px; border-radius: 4px;
}
.subscribe summary::-webkit-details-marker { display: none; }
.subscribe summary:hover, .subscribe[open] summary { background: var(--navy); }
.subscribe .short { display: none; }
.subscribe-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: 320px; z-index: 20;
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--pop);
  padding: 16px; font-size: 14px; line-height: 20px;
}
.subscribe-panel p + p { margin-top: 8px; }
.subscribe-title { font-family: var(--head); font-weight: 700; color: var(--navy); font-size: 16px; line-height: 24px; }

/* Overall status bar */
.banner { border-radius: 4px; padding: 16px 20px; color: #fff; }
.banner h1 { color: inherit; font-size: 20px; line-height: 28px; }
.banner.b-operational { background: var(--ok); }
.banner.b-degraded { background: var(--degraded-banner); color: var(--on-amber); }
.banner.b-partial_outage { background: var(--partial-banner); }
.banner.b-major_outage { background: var(--major); }
.banner-lines { margin-top: 12px; font-size: 14px; line-height: 20px; }
.banner-lines p + p { margin-top: 4px; }

/* Active incident posted by Totality */
.active { margin-top: 24px; border: 1px solid var(--degraded-fill); border-radius: 4px; overflow: hidden; }
.active-title { padding: 12px 20px; font-size: 16px; line-height: 24px; }
.active-title a { color: inherit; text-decoration: none; }
.active-title a:hover { text-decoration: underline; }
.active.b-degraded .active-title { background: var(--degraded-banner); color: var(--on-amber); }
.active.b-partial_outage { border-color: var(--partial-fill); }
.active.b-partial_outage .active-title { background: var(--partial-banner); color: #fff; }
.active.b-major_outage { border-color: var(--major); }
.active.b-major_outage .active-title { background: var(--major); color: #fff; }
.active.b-operational { border-color: var(--line); }
.active.b-operational .active-title { background: var(--ground); color: var(--navy); }
.active-body { padding: 16px 20px; }
.active-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 12px; }
.active-meta a { white-space: nowrap; }

/* Rich text (vendor and staff updates) */
.rich p + p, .rich p + ul, .rich ul + p { margin-top: 8px; }
.rich ul { margin: 8px 0 0; padding-left: 20px; }
.rich li + li { margin-top: 2px; }
.rich { overflow-wrap: anywhere; }

/* Sections */
.section { margin-top: 48px; }
.section > h2 { font-size: 18px; line-height: 24px; margin-bottom: 12px; }

/* Component block */
.components { border: 1px solid var(--line); border-radius: 4px; }
.components .group {
  background: var(--ground); font-size: 14px; line-height: 20px; padding: 8px 20px;
  border-top: 1px solid var(--line);
}
.components .group:first-child { border-top: 0; border-radius: 4px 4px 0 0; }
.row { padding: 16px 20px; border-top: 1px solid var(--line); }
.row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.row .name { font-size: 16px; line-height: 24px; }
.row .name a { color: inherit; text-decoration: none; }
.row .name a:hover { text-decoration: underline; }
.row-note { color: var(--muted); font-size: 14px; line-height: 20px; margin-top: 2px; }
.row-incidents { list-style: none; margin: 8px 0 0; padding: 0; }
.row-incidents li + li { margin-top: 8px; }
.row-incidents .meta { display: block; }
.under { margin-top: 12px; color: var(--muted); font-size: 14px; line-height: 20px; }

/* Status indicator: a dot and a word. No pill. */
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; white-space: nowrap; }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.s-operational { color: var(--ok); }
.s-degraded { color: var(--degraded); }
.s-degraded .dot { background: var(--degraded-fill); }
.s-partial_outage { color: var(--partial); }
.s-partial_outage .dot { background: var(--partial-fill); }
.s-major_outage { color: var(--major); }
.s-maintenance { color: var(--maint); }
.s-unknown { color: var(--muted); }
.s-unknown .dot { background: transparent; border: 1.5px solid var(--nodata); }

/* 90-day bar */
.bar { display: flex; gap: 2px; height: 28px; margin-top: 12px; }
.d { flex: 1; min-width: 0; border-radius: 1px; background: var(--nodata); }
.d-ok { background: var(--ok-fill); }
.d-minor { background: var(--degraded-fill); }
.d-major { background: var(--partial-fill); }
.d-critical { background: var(--major); }
.d:hover, .d.is-active { opacity: .75; }
.legend { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--muted); }
.legend .rule { flex: 1; height: 1px; background: var(--line); }
.legend .mid { text-align: center; }
.legend > span:first-child, .legend > span:last-child { white-space: nowrap; }
.w30 { display: none; }

/* Bar tooltip (uptime.js) */
.tip {
  position: absolute; z-index: 30; max-width: 280px; width: max-content;
  background: var(--bg); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--pop);
  padding: 12px; font-size: 14px; line-height: 20px;
}
.tip[hidden] { display: none; }
.tip-date { font-family: var(--head); font-weight: 700; color: var(--navy); }
.tip-state { margin-top: 2px; }
.tip-state.s-ok { color: var(--text); }
.tip-state.s-nodata { color: var(--muted); }
.tip-state.s-minor { color: var(--degraded); }
.tip-state.s-major { color: var(--partial); }
.tip-state.s-critical { color: var(--major); }
.tip ul { list-style: none; margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid var(--line); }
.tip li { display: flex; justify-content: space-between; gap: 12px; }
.tip li + li { margin-top: 4px; }
.tip li span { color: var(--muted); white-space: nowrap; }

/* Scheduled maintenance */
.plain-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.plain-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.plain-list .meta { display: block; }
.strong-link { font-family: var(--head); font-weight: 700; color: var(--navy); }

/* Past incidents by day */
.days { border-bottom: 1px solid var(--line); }
.day { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.day-date { display: flex; flex-direction: column; }
.day-num { font-family: var(--head); font-weight: 700; color: var(--navy); }
.day-item + .day-item { margin-top: 12px; }
.day-item .meta { display: block; }
.day-item .rich { margin-top: 4px; }

/* Incident page */
.back { font-size: 14px; line-height: 20px; margin-bottom: 24px; }
.back a { display: inline-block; padding: 4px 0; }
.page-title { font-size: 28px; line-height: 34px; }
.source-line { margin-top: 8px; }
.facts { display: grid; grid-template-columns: 120px 1fr; gap: 4px 16px; margin: 24px 0 0; padding-bottom: 24px; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 24px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.fact-status.s-degraded { color: var(--degraded); }
.updates { list-style: none; margin: 0; padding: 0; }
.updates li { display: grid; grid-template-columns: 160px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.updates li:first-child { border-top: 0; padding-top: 4px; }
.update-when { display: flex; flex-direction: column; }
.update-when strong { color: var(--navy); font-family: var(--head); }

.notfound { padding-top: 24px; }
.notfound p { margin-top: 12px; }

/* Footer: the website's pale band */
.site-footer { margin-top: 64px; background: var(--ground); border-top: 1px solid var(--line); padding: 48px 0 32px; font-size: 14px; line-height: 20px; }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-cols p + p { margin-top: 8px; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
.footer-cols li + li { margin-top: 6px; }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
/* The website's footer column titles: the one place uppercase is used. */
.footer-title { font-family: var(--body); font-weight: 400; font-size: 12px; line-height: 16px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.legal { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  main.wrap { padding-top: 24px; }
  .header-inner { min-height: 60px; gap: 12px; }
  .brand img { height: 40px; }
  .header-nav > a { display: none; }
  .subscribe .long { display: none; }
  .subscribe .short { display: inline; }
  .subscribe summary { min-height: 44px; display: flex; align-items: center; }
  .subscribe-panel { position: fixed; left: 16px; right: 16px; top: 68px; width: auto; }
  .banner { padding: 14px 16px; }
  .banner h1 { font-size: 18px; line-height: 24px; }
  .row { padding: 16px; }
  .components .group { padding: 8px 16px; }
  .bar .d:nth-child(-n+60) { display: none; }
  .w90 { display: none; }
  .w30 { display: inline; }
  .legend { flex-wrap: wrap; row-gap: 2px; }
  .legend .rule { display: none; }
  .legend > span:last-child { margin-left: auto; }
  .legend .mid { order: 3; width: 100%; text-align: left; }
  .day, .updates li { grid-template-columns: 1fr; gap: 4px; }
  .day-date, .update-when { flex-direction: row; gap: 8px; align-items: baseline; }
  .facts { grid-template-columns: 96px 1fr; }
  .active-meta { flex-direction: column; gap: 4px; }
  .footer-cols { grid-template-columns: 1fr; gap: 24px; }
  .back a { min-height: 44px; display: inline-flex; align-items: center; }
  .page-title { font-size: 24px; line-height: 30px; }
}

/* Incident history link and page */
.history-link { margin-top: 16px; }
.button-secondary { display: inline-block; padding: 9px 15px; border: 1px solid var(--line); border-radius: 4px; color: var(--navy); text-decoration: none; font-size: 15px; line-height: 22px; }
.button-secondary:hover { background: var(--ground); color: var(--navy); }
.history-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.history-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.history-list .meta { display: block; }
.month { margin-top: 40px; }

/* Subscribe form (header panel and the result page) */
.subscribe-form { display: flex; flex-direction: column; gap: 8px; }
.subscribe-form p { margin: 0; }
.subscribe-form label[for] { font-family: var(--head); font-weight: 700; color: var(--navy); margin-top: 4px; }
.subscribe-form input[type=email] { font: 400 16px/24px var(--body); color: var(--text); border: 1px solid #cfd7e4; border-radius: 4px; padding: 8px 10px; width: 100%; }
.subscribe-form input[type=email]:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: var(--brand); }
.subscribe-form .check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; line-height: 20px; }
.subscribe-form .check input { margin: 3px 0 0; width: 16px; height: 16px; flex: none; }
.subscribe-form button { align-self: flex-start; font: 400 15px/22px var(--body); background: var(--deep); color: #fff; border: 0; border-radius: 4px; padding: 10px 16px; cursor: pointer; }
.subscribe-form button:hover { background: var(--navy); }
.form-error { color: var(--major); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.subscribe-page { max-width: 480px; }

/* Current status: us, then them, as two separate blocks */
.status-group + .status-group { margin-top: 32px; }
.group-title { display: flex; align-items: center; gap: 10px; font-size: 16px; line-height: 24px; margin-bottom: 8px; }
.group-title img { width: 22px; height: 22px; flex: none; }
.group-note { color: var(--muted); font-size: 14px; line-height: 20px; margin: -4px 0 12px; }
.components > .row:first-child { border-top: 0; }
.row .name { display: flex; align-items: center; gap: 10px; }
.vendor-logo { width: 20px; height: 20px; flex: none; }
