/* Status page (status.html) and the 404 page. Builds on css/style-a.css. */

/* ---- Team notice (status.json) ---- */
.st-notice-wrap { padding-bottom: 0; }
.st-notice { border-left-width: 14px; border-left-color: var(--sky-2); }
.st-notice[data-level="ok"] { border-left-color: var(--pine); }
.st-notice[data-level="warn"] { border-left-color: var(--mustard-2); background: #fff8e1; }
.st-notice[data-level="down"] { border-left-color: var(--red); background: #fdeced; }
.st-notice-title {
  display: inline-block; margin: 0 0 12px; padding: 4px 12px; font-family: var(--body); font-weight: 800;
  font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; background: var(--ink); color: var(--snow);
}
.st-notice[data-level="ok"] .st-notice-title { background: var(--pine); }
.st-notice[data-level="warn"] .st-notice-title { background: var(--mustard); color: var(--ink); }
.st-notice[data-level="down"] .st-notice-title { background: var(--red); }
.st-notice-msg { margin: 0; font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 800; max-width: 60ch; overflow-wrap: anywhere; }
.st-notice-links { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px 24px; }
.st-notice-time { margin: 14px 0 0; color: var(--muted); font-size: .92rem; }

/* ---- Checks ---- */
.st-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 20px; }
.st-summary { margin: 0; font-weight: 800; font-size: 1.05rem; }
.st-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.st-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; align-items: center;
  background: var(--snow); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 16px 20px;
}
.st-name h3 { margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(1.3rem, 2.4vw, 1.7rem); line-height: 1.05; }
.st-name p { margin: 4px 0 0; color: var(--muted); }
.st-state { text-align: right; min-width: 0; }
.st-badge {
  display: inline-block; padding: 5px 14px; border: 3px solid var(--ink); font-weight: 800; text-transform: uppercase;
  letter-spacing: .08em; font-size: .85rem; background: var(--snow-2); color: var(--ink); white-space: nowrap;
}
.st-badge::before { content: ""; display: inline-block; width: .7em; height: .7em; margin-right: .5em; border-radius: 50%; background: currentColor; vertical-align: -.02em; }
.st-badge[data-state="up"] { background: var(--pine); color: var(--snow); }
.st-badge[data-state="slow"], .st-badge[data-state="trouble"] { background: var(--mustard); color: var(--ink); }
.st-badge[data-state="down"] { background: var(--red); color: var(--snow); }
.st-badge[data-state="notlive"] { background: var(--snow-2); color: var(--muted); }
.st-badge[data-state="checking"] { background: var(--snow); color: var(--muted); }
.st-detail { margin: 6px 0 0; font-weight: 800; font-size: .95rem; }
.st-time { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }
.st-detail:empty, .st-time:empty { display: none; }
.st-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 24px; }
.st-actions .st-small { margin: 0; flex: 1 1 260px; }
.st-small { color: var(--muted); font-size: .95rem; margin: 18px 0 0; max-width: 70ch; }
.st-intro { margin: 12px 0 20px; font-size: 1.08rem; max-width: 62ch; }

@media (max-width: 640px) {
  .st-item { grid-template-columns: 1fr; padding: 14px 16px; }
  .st-state { text-align: left; }
}
@media (prefers-reduced-motion: no-preference) {
  .st-badge[data-state="checking"]::before { animation: st-pulse 1s ease-in-out infinite alternate; }
}
@keyframes st-pulse { from { opacity: .25; } to { opacity: 1; } }

/* ---- 404 ---- */
.nf-links { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.nf-links a {
  display: block; height: 100%; padding: 18px 20px; text-decoration: none; color: var(--ink); background: var(--snow);
  border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); transition: transform .1s;
}
.nf-links li:nth-child(2) a { background: var(--sky); }
.nf-links li:nth-child(3) a { background: var(--mustard); }
.nf-links a:hover { transform: translate(-3px, -3px) rotate(-.6deg); }
.nf-links b { display: block; font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 1.6rem; line-height: 1.05; }
.nf-links span { display: block; margin-top: 4px; font-weight: 800; }
.nf-safe { margin: 28px 0 0; padding: 14px 16px; background: var(--snow); border: 3px solid var(--ink); border-left: 12px solid var(--red); font-size: 1.05rem; max-width: 70ch; }
.nf-safe a { color: var(--red-2); font-weight: 800; }
@media (prefers-reduced-motion: reduce) {
  .nf-links a { transition: none; }
  .nf-links a:hover { transform: none; }
}
