/* ============================================================
   The Masked House — Network Status page + menu indicator
   ============================================================ */

/* Menu item with live status dot */
.main-nav a.nav-status { display: inline-flex; align-items: center; gap: 7px; }
.ns-nav-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; background: #2ecc71; box-shadow: 0 0 0 0 rgba(46,204,113,.6); animation: nsNav 2.4s infinite; }
.ns-nav-maintenance { background: #29b6f6; }
.ns-nav-degraded { background: #ffc21a; }
.ns-nav-partial { background: #ff8a3d; }
.ns-nav-major { background: #ff4d6d; }
@keyframes nsNav { 0% { box-shadow: 0 0 0 0 currentColor; opacity: 1 } 70% { box-shadow: 0 0 0 7px transparent; opacity: .85 } 100% { opacity: 1 } }
/* Nine menu items: the full "Network Status" label only when there is room,
   otherwise just "Status" + the dot, and the spacing tightens like the 861-1320 band. */
@media (min-width: 861px) and (max-width: 1799px) { .nsl-full { display: none; } }
@media (min-width: 1321px) and (max-width: 1640px) {
  .header-inner { gap: 18px; }
  .main-nav { gap: 0; }
  .main-nav a { padding: 8px 10px; font-size: .88rem; }
  .main-nav a::after { left: 10px; right: 10px; }
  .brand-logo, .site-header.scrolled .brand-logo { width: 64px; height: 64px; }
}
.main-nav a.nav-status::after { left: 26px; }
/* Tightest desktop band: the dot alone (tooltip + aria-label still say Network Status). */
@media (min-width: 861px) and (max-width: 1240px) {
  .nsl-text { display: none; }
  .main-nav a.nav-status { padding-left: 8px; padding-right: 8px; }
  .main-nav a.nav-status::after { left: 6px; right: 6px; }
}
@media (min-width: 1081px) and (max-width: 1160px) {
  .header-inner { gap: 10px; }
  .main-nav a { padding-left: 7px; padding-right: 7px; }
  .main-nav a::after { left: 7px; right: 7px; }
}
/* Mobile slide-out menu has room: always the full label. */
@media (max-width: 860px) { .nsl-full, .nsl-text { display: inline; } }

/* Page */
.ns-page { padding: 60px 0 90px; }
.ns-wrap-col { width: min(920px, 92%); margin: 0 auto; display: flex; flex-direction: column; gap: 26px; }
.ns-hero-state {
  display: flex; align-items: center; gap: 18px; padding: 22px 26px; border-radius: var(--radius);
  background: var(--ns-bg); border: 1px solid var(--ns-c); box-shadow: var(--shadow);
}
.ns-hero-state .ns-big-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--ns-c); flex: 0 0 22px; animation: nsBig 2.2s infinite; }
@keyframes nsBig { 0% { box-shadow: 0 0 0 0 var(--ns-c) } 70% { box-shadow: 0 0 0 14px transparent } 100% { box-shadow: 0 0 0 0 transparent } }
.ns-hero-state h2 { font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 800; line-height: 1.25; }
.ns-hero-state p { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.ns-intro { color: var(--muted); text-align: center; max-width: 680px; margin: 0 auto; }

.ns-h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.ns-h3 small { font-weight: 400; color: var(--muted); font-size: .8rem; }

/* Event cards */
.ns-event { background: linear-gradient(var(--ns-bg), transparent 140px), var(--bg-card); border: 1px solid color-mix(in srgb, var(--ns-c) 45%, transparent); border-radius: var(--radius); padding: 20px 22px; scroll-margin-top: 110px; }
.ns-event:target { box-shadow: 0 0 0 2px var(--ns-c), var(--shadow); }
.ns-ev-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: flex-start; }
.ns-ev-top h4 { font-size: 1.08rem; font-weight: 700; line-height: 1.35; }
.ns-ev-ref { color: var(--muted); font-size: .76rem; letter-spacing: .04em; }
.ns-pill { display: inline-block; padding: 3px 12px; border-radius: 20px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: var(--ns-c); color: #150829; white-space: nowrap; }
.ns-pill.ns-pill-ok { background: #2ecc71; }
.ns-pill.ns-pill-mut { background: rgba(255,255,255,.14); color: var(--muted); }
.ns-ev-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px 18px; margin: 14px 0 6px; font-size: .84rem; }
.ns-ev-meta div span { display: block; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.ns-ev-meta div b { font-weight: 600; }

.ns-timeline { list-style: none; margin: 14px 0 0; padding: 0 0 0 22px; position: relative; }
.ns-timeline::before { content: ""; position: absolute; left: 5px; top: 7px; bottom: 7px; width: 2px; background: var(--border); }
.ns-timeline li { position: relative; padding-bottom: 16px; }
.ns-timeline li:last-child { padding-bottom: 0; }
.ns-timeline li::before { content: ""; position: absolute; left: -21px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--dot, var(--ns-c)); box-shadow: 0 0 0 3px var(--bg-card); }
.ns-tl-head { font-size: .8rem; color: var(--muted); }
.ns-tl-head b { color: var(--text); margin-right: 6px; }
.ns-timeline p { margin-top: 3px; font-size: .9rem; white-space: pre-wrap; }

/* Services board */
.ns-board { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ns-svc { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 15px 22px; border-bottom: 1px solid var(--border); }
.ns-svc:last-child { border-bottom: 0; }
.ns-svc strong { display: block; font-weight: 600; }
.ns-svc small { color: var(--muted); font-size: .78rem; }
.ns-svc-state { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 600; color: var(--ns-c); white-space: nowrap; }
.ns-svc-state i { width: 10px; height: 10px; border-radius: 50%; background: var(--ns-c); }

/* History */
.ns-day { padding: 14px 0; border-bottom: 1px solid var(--border); }
.ns-day:last-child { border-bottom: 0; }
.ns-day-h { font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
.ns-day-none { color: var(--muted); font-size: .85rem; }
.ns-past { margin-top: 8px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 12px 16px; scroll-margin-top: 110px; }
.ns-past summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.ns-past summary::-webkit-details-marker { display: none; }
.ns-past summary b { font-weight: 600; }
.ns-past summary b::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ns-c); margin-right: 8px; vertical-align: middle; }
.ns-past summary small { color: var(--muted); font-size: .78rem; display: block; }
.ns-past:target { box-shadow: 0 0 0 2px var(--ns-c); }

.ns-foot { text-align: center; color: var(--muted); font-size: .86rem; }
.ns-foot a { color: var(--gold); }
.ns-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center; font-size: .76rem; color: var(--muted); }
.ns-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ns-legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

@media (max-width: 620px) {
  .ns-hero-state { padding: 18px; }
  .ns-svc { padding: 13px 16px; flex-wrap: wrap; }
  .ns-event { padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ns-nav-dot, .ns-hero-state .ns-big-dot { animation: none; }
}
