/* The status page. Brand: site/DESIGN.md (navy, coral, Poppins, the 4 px
   spacing scale, soft shadows instead of borders on cards). */

/* Fonts are served for a day; style.css and the rest carry a hash. */
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url("/assets/fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("/assets/fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("/assets/fonts/poppins-latin-600-normal.woff2") format("woff2"); }

:root {
  --navy: #0B1130;
  --navy-2: #121A44;
  --coral: #FF3D5A;
  --coral-hover: #E72A47;
  --coral-soft: #FFE8EC;
  --ground: #F4F6FC;
  --card: #FFFFFF;
  --text: #0B1130;
  --text-2: #4A5378;
  --text-3: #747C9C;
  --line: #E6E9F4;
  --shadow: 0 1px 2px rgba(11, 17, 48, .06), 0 8px 24px rgba(11, 17, 48, .06);

  --ok: #12A150;
  --minor: #E8A317;
  --partial: #F27420;
  --major: #E5484D;
  --maint: #3E7BFA;
  --none: #D7DBEA;

  --ok-soft: #E6F6EC;
  --minor-soft: #FDF4DF;
  --partial-soft: #FEEDE1;
  --major-soft: #FCE8E9;
  --maint-soft: #E7EEFF;
  --none-soft: #EEF0F7;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #070B20;
    --card: #121A44;
    --text: #FFFFFF;
    --text-2: #B4BAD6;
    --text-3: #8C93B5;
    --line: #1D2757;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    --none: #2A3466;
    --ok-soft: rgba(18, 161, 80, .16);
    --minor-soft: rgba(232, 163, 23, .16);
    --partial-soft: rgba(242, 116, 32, .16);
    --major-soft: rgba(229, 72, 77, .18);
    --maint-soft: rgba(62, 123, 250, .18);
    --none-soft: rgba(180, 186, 214, .1);
    --coral-soft: rgba(255, 61, 90, .16);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--text);
  font: 400 16px/24px "Poppins", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
time { font-variant-numeric: tabular-nums; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--card); padding: 8px 16px; border-radius: 999px; z-index: 2; }
.skip:focus { left: 16px; }
.vh, .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { left: -9999px; }

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

/* The navy band and the cards that sit over its lower edge. */
.band { background: var(--navy); color: #FFFFFF; padding: 24px 0 64px; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { display: block; height: 28px; width: auto; }
.tag { font-size: 16px; line-height: 24px; color: #B4BAD6; padding-left: 12px; border-left: 1px solid #2A3466; }
.pill {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 16px; border-radius: 999px;
  background: var(--coral); color: #FFFFFF; font-size: 14px; line-height: 20px; font-weight: 600; text-decoration: none;
  transition: background-color 300ms cubic-bezier(0.22, 1, 0.36, 1);
}
.pill:hover { background: var(--coral-hover); }

main.wrap { flex: 1 0 auto; margin-top: -40px; padding-bottom: 64px; }
main > * + * { margin-top: 24px; }

.card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 24px 16px; }
.card-h { font-size: 20px; line-height: 28px; margin-bottom: 16px; }
.sec-h { font-size: 20px; line-height: 28px; margin: 32px 0 16px; }
.band-h { margin-top: 32px; }
.band-h h1 { font-size: 30px; line-height: 36px; overflow-wrap: anywhere; }
.crumb { font-size: 14px; line-height: 20px; margin-bottom: 8px; }
.crumb a { color: #B4BAD6; text-underline-offset: 4px; }
.crumb a:hover { color: #FFFFFF; }
.empty { color: var(--text-2); }
.more { margin-top: 16px; font-size: 14px; line-height: 20px; }
.more a, .past a, .inc h3 a { text-decoration-color: var(--line); text-underline-offset: 4px; }
.more a:hover, .past a:hover, .inc h3 a:hover { text-decoration-color: currentColor; }

/* The banner: one line on how things are. */
.banner { display: flex; align-items: center; gap: 16px; background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 24px 16px; }
.banner h1 { font-size: 20px; line-height: 28px; }
.banner p { color: var(--text-2); font-size: 14px; line-height: 20px; margin-top: 2px; }
.banner-icon { flex: none; width: 40px; height: 40px; border-radius: 999px; background: var(--ok); position: relative; }
.banner-icon::after { content: ""; position: absolute; inset: 0; background: center / 20px 20px no-repeat; }
.banner-ok .banner-icon::after { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.banner-minor .banner-icon, .banner-partial .banner-icon, .banner-major .banner-icon, .banner-maint .banner-icon, .banner-none .banner-icon { background: var(--minor); }
.banner-partial .banner-icon { background: var(--partial); }
.banner-major .banner-icon { background: var(--major); }
.banner-maint .banner-icon { background: var(--maint); }
.banner-none .banner-icon { background: var(--none); }
.banner-minor .banner-icon::after, .banner-partial .banner-icon::after, .banner-major .banner-icon::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M12 6v7'/%3E%3Cpath d='M12 18h.01'/%3E%3C/svg%3E");
}
.banner-maint .banner-icon::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.7 6.3a4 4 0 0 0-5.4 5.2L4 16.8 7.2 20l5.3-5.3a4 4 0 0 0 5.2-5.4l-2.5 2.5-2.5-.7-.7-2.5z'/%3E%3C/svg%3E");
}
.banner-none .banner-icon::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 12h10'/%3E%3C/svg%3E");
}

/* Components and their bars. */
.comps { list-style: none; margin: 0; padding: 0; }
.comp + .comp { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.comp-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.comp-name { min-width: 0; }
.comp h3 { font-size: 16px; line-height: 24px; }
.comp-name p { color: var(--text-3); font-size: 14px; line-height: 20px; }
.state { flex: none; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 24px; font-weight: 500; white-space: nowrap; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--ok); }
.state-operational { color: var(--ok); }
.state-degraded { color: var(--minor); }
.state-degraded .dot { background: var(--minor); }
.state-outage { color: var(--major); }
.state-outage .dot { background: var(--major); }
.state-maintenance { color: var(--maint); }
.state-maintenance .dot { background: var(--maint); }
.state-no_data { color: var(--text-3); }
.state-no_data .dot { background: var(--none); }

.bars { display: flex; gap: 2px; height: 32px; margin-top: 12px; }
.b { flex: 1 1 0; min-width: 0; border-radius: 2px; background: var(--none); }
.b-ok { background: var(--ok); }
.b-minor { background: var(--minor); }
.b-partial { background: var(--partial); }
.b-major { background: var(--major); }
.b-maint { background: var(--maint); }
.bars .b:hover { opacity: .7; }
.axis { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; color: var(--text-3); font-size: 12px; line-height: 16px; }
.axis .up { color: var(--text-2); font-weight: 500; }
.axis .long { display: none; }
@media (min-width: 640px) {
  .axis .long { display: inline; }
  .axis .short { display: none; }
}
@media (max-width: 639px) {
  .bars .old { display: none; }
}

.legend { list-style: none; margin: 24px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 16px;
  color: var(--text-3); font-size: 12px; line-height: 16px; }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend .b { flex: none; width: 8px; height: 16px; }

/* Incidents. */
.inc { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); padding: 24px 16px; border-top: 4px solid var(--major); }
.inc + .inc { margin-top: 16px; }
.inc-degraded { border-top-color: var(--minor); }
.inc-maintenance { border-top-color: var(--maint); }
.inc-resolved { border-top-color: var(--ok); }
.inc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.inc-head > .meta { margin-top: 4px; }
.inc h3 { font-size: 18px; line-height: 28px; min-width: 0; overflow-wrap: anywhere; }
.badge { flex: none; display: inline-flex; align-items: center; min-height: 28px; padding: 2px 12px; border-radius: 999px; font-size: 12px; line-height: 16px;
  font-weight: 600; background: var(--major-soft); color: var(--major); white-space: nowrap; }
.badge-degraded { background: var(--minor-soft); color: #B07400; }
.badge-maintenance { background: var(--maint-soft); color: var(--maint); }
.badge-resolved { background: var(--ok-soft); color: var(--ok); }
@media (prefers-color-scheme: dark) { .badge-degraded { color: var(--minor); } }
.meta { color: var(--text-3); font-size: 14px; line-height: 20px; margin-top: 4px; }
.updates { list-style: none; margin: 16px 0 0; padding: 0; }
.updates li { position: relative; padding: 0 0 16px 24px; }
.updates li:last-child { padding-bottom: 0; }
.updates li::before { content: ""; position: absolute; left: 4px; top: 8px; width: 8px; height: 8px; border-radius: 999px; background: var(--text-3); }
.updates li:first-child::before { background: var(--coral); }
.updates li::after { content: ""; position: absolute; left: 7px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.updates li:last-child::after { display: none; }
.u-head { font-size: 14px; line-height: 24px; }
.u-head time { color: var(--text-3); margin-left: 4px; }
.updates p + p { margin-top: 8px; }
.updates li > p:not(.u-head) { color: var(--text-2); }

.pasts { list-style: none; margin: 0; padding: 0; }
.past + .past { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.past a { font-weight: 500; }
.month { margin-top: 24px; }
.month:first-child { margin-top: 0; }

/* Subscribing. */
.sub > p:not(.flash) { color: var(--text-2); }
.sub-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sub-form input[type="email"] {
  flex: 1 1 240px; min-width: 0; min-height: 48px; padding: 12px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--ground); color: var(--text); font: inherit;
}
.sub-form input[type="email"]::placeholder { color: var(--text-3); }
.sub-form button {
  flex: none; min-height: 48px; padding: 12px 24px; border: 0; border-radius: 999px; background: var(--coral); color: #FFFFFF;
  font: 600 16px/24px "Poppins", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; cursor: pointer;
  transition: background-color 300ms cubic-bezier(0.22, 1, 0.36, 1);
}
.sub-form button:hover { background: var(--coral-hover); }
@media (max-width: 479px) { .sub-form button { flex: 1 1 100%; } }
.card > .flash:first-child { margin-top: 0; }
.flash { margin-top: 16px; padding: 12px 16px; border-radius: 12px; font-size: 14px; line-height: 20px; }
.flash-ok { background: var(--ok-soft); color: var(--text); }
.flash-error { background: var(--major-soft); color: var(--text); }

.foot { background: var(--navy); color: #B4BAD6; font-size: 14px; line-height: 20px; padding: 32px 0; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.foot a { color: #FFFFFF; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }

@media (min-width: 640px) {
  .band { padding: 32px 0 80px; }
  main.wrap { margin-top: -48px; }
  .card, .banner, .inc { padding: 32px; }
  .banner h1 { font-size: 24px; line-height: 32px; }
  .band-h h1 { font-size: 36px; line-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
