/* Status site on top of kit.css: the hero with the overall state and the dome globe, the
   component boards, the maintenance panel and the incident log. Same tokens, no new colours. */

/* The site has no mark yet, so the wordmark stays visible on phones too. */
.brand-word { gap: 8px; font-size: 17px; }
.brand-word small { font: 500 14px/1 var(--font-body); letter-spacing: 0; color: var(--on-field-2); }
@media (max-width: 420px) {
  .nav .brand-word span { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .nav .brand-word small { display: none; }
}

/* ------------------------------------------------------------------ hero */

.hero-status { display: block; min-height: 0; padding-block: 112px 0; }
.hero-status .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 26px; }
/* One line on wide screens, two on phones; sized from the column (width of the text in em). */
.hero-status .hero-title { --title-em: 18; margin-top: 12px; }
.hero-status .hero-title-2 { display: inline; }
html[data-lang="en"] .hero-status .hero-title { --title-em: 16; }
@media (max-width: 700px) {
  .hero-status .hero-title { --title-em: 11; }
  .hero-status .hero-title-2 { display: block; }
  html[data-lang="en"] .hero-status .hero-title { --title-em: 8.67; }
}

/* The overall state: one word for the whole fleet, the count, and the open incidents beside it. */
.state-card { display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); gap: 18px clamp(24px, 4vw, 56px); padding: 24px clamp(20px, 3vw, 32px); }
.state-main { display: grid; align-content: start; gap: 8px; }
.state { display: flex; align-items: center; gap: 14px; }
.state b { font: 700 clamp(26px, 2.8vw, 36px)/1.05 var(--font-display); letter-spacing: -0.035em; color: var(--card-ink); }
.state-dot { flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--ok); }
.state-bad .state-dot, .state-warn .state-dot { background: var(--bad); }
.state-maint .state-dot { background: var(--ui-violet); }
.card .state-count { font-size: 16px; font-weight: 600; color: var(--card-ink); }
.card .state-snap { font-size: 14px; color: var(--card-sub); }
.card .state-open-h { font-size: 13.5px; font-weight: 600; color: var(--card-sub); padding-bottom: 6px; }
.state-list li { border-top: 1px solid var(--vig-line); }
.state-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; color: var(--ui-violet); font-weight: 600; font-size: 15.5px; line-height: 1.35; text-decoration: none; }
.state-list a::after { content: ""; flex: none; width: 7px; height: 7px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); margin-right: 4px; }
.state-list a:hover { color: #4f2ed0; }
@media (max-width: 760px) { .state-card { grid-template-columns: minmax(0, 1fr); } }

/* The selected server: docked in the top right of the globe box, under the hero below 1100px.
   The hero clips, so the card never leaves the box: it is capped at the globe's height and only
   its component list scrolls when a server has more rows than fit. */
.srv-dock { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; height: var(--globe-h); padding-block: 14px; display: flex; justify-content: flex-end; align-items: flex-start; pointer-events: none; }
.srv-card { width: min(100%, 380px); padding: 20px; gap: 12px; pointer-events: auto; box-shadow: 0 40px 70px -30px rgba(10, 3, 50, 0.85), inset 0 -1px 0 rgba(23, 13, 69, 0.06); }
.srv-dock .srv-card { max-height: 100%; }
.srv-card > * { flex: none; }
.srv-dock .srv-card > .srv-vig { flex: 0 1 auto; min-height: 76px; overflow-y: auto; overscroll-behavior: contain; }
/* The kit centres vignette content; a scrolling list must start at the top or its first rows are unreachable. */
.srv-vig { align-content: start; }
.srv-top { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: start; gap: 6px 12px; }
.srv-id { min-width: 0; }
.card .srv-name { font: 700 28px/1 var(--font-display); letter-spacing: -0.035em; color: var(--card-ink); }
.card .srv-role { margin-top: 7px; color: var(--card-sub); font-size: 15px; line-height: 1.4; }
.srv-top .status { margin-top: 6px; }
.srv-close { appearance: none; display: grid; place-items: center; width: 32px; height: 32px; margin: -4px -6px 0 0; border: 0; border-radius: 10px; background: transparent; color: var(--card-sub); cursor: pointer; transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out); }
.srv-close:hover { background: var(--vig); color: var(--card-ink); }
.srv-close svg { width: 22px; height: 22px; }
.card .srv-place { display: flex; align-items: flex-start; gap: 8px; color: var(--card-sub); font-size: 14px; line-height: 1.45; }
.srv-place .ico { width: 18px; height: 18px; margin-top: 1px; color: var(--ui-violet); }
.srv-line { display: block; }
.srv-vig { min-height: 0; padding: 8px; place-items: stretch; flex: 0 0 auto; border-radius: 16px; }
.srv-vig .ui-sheet { width: 100%; padding: 2px 12px; }
.srv-vig .ui-row { padding: 8px 0; font-size: 13.5px; }
.srv-vig .ui-val { max-width: 58%; text-align: right; }
.ui-val.st-ok { color: var(--ok); }
.ui-val.st-bad, .ui-val.st-warn { color: var(--bad); }
.ui-val.st-maint { color: var(--ui-violet); }
.card .srv-inc { font-size: 14px; line-height: 1.5; color: var(--card-sub); }
.srv-inc a { color: var(--ui-violet); font-weight: 600; text-underline-offset: 3px; }
.srv-slot { display: none; }
@media (max-width: 1100px) {
  .srv-slot { display: block; margin-top: 12px; }
  .srv-slot .srv-card { width: 100%; max-width: 640px; }
}

/* ------------------------------------------------------------------ dome */

.dome { --globe-h: clamp(280px, 35vw, 520px); position: relative; margin-top: clamp(24px, 3vw, 36px); }
.globe-bar { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; }
.globe {
  position: relative;
  width: 100%;
  height: var(--globe-h);
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.globe.is-dragging { cursor: grabbing; }
.globe:focus-visible { outline-offset: -6px; border-radius: 22px; }
.globe canvas { position: absolute; left: 0; top: 0; display: block; }
.globe-pins { position: absolute; inset: 0; pointer-events: none; }

/* A dark fill under the switch keeps white labels above 4.5:1 where it sits on the hero's light. */
.mode { display: inline-grid; grid-auto-flow: column; padding: 3px; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 12px; background: rgba(20, 11, 59, 0.3); }
.mode button {
  appearance: none; border: 0; height: 34px; padding: 0 14px; border-radius: 9px; cursor: pointer;
  background: transparent; color: #fff; font: 600 14px/1 var(--font-body);
  transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out);
}
.mode button:hover { background: rgba(255, 255, 255, 0.1); }
.mode button[aria-pressed="true"] { background: #fff; color: var(--ink); }

.picker { display: flex; flex-wrap: wrap; gap: 6px; max-width: min(100%, 560px); }
.pick {
  appearance: none; height: 40px; padding: 0 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(255, 255, 255, 0.07); color: #fff;
  font: 600 13.5px/1 var(--font-body); letter-spacing: 0.01em; font-variant-numeric: tabular-nums;
  transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out), color 0.3s var(--ease-out), scale 0.18s var(--ease-out);
}
.pick:hover { background: rgba(255, 255, 255, 0.13); border-color: rgba(255, 255, 255, 0.45); }
.pick:active { scale: 0.97; }
.pick-maint, .pick-retired { border-style: dashed; }
.pick-retired { color: #ddd5ff; }
.pick[aria-pressed="true"] { background: var(--peach); border-color: var(--peach); border-style: solid; color: var(--on-peach); }

/* A pin is a zero-size anchor placed by globe.js; the dot centres on it, the label sits outside. */
.pin { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: auto; cursor: pointer; will-change: transform; }
.pin-dot {
  position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--peach);
  box-shadow: 0 0 0 2.5px var(--ink), 0 6px 12px -4px rgba(10, 3, 50, 0.7);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}
.pin-label {
  position: absolute; left: 13px; top: -12px; height: 24px;
  display: inline-flex; align-items: center; padding: 0 8px;
  border-radius: 8px; background: rgba(20, 11, 59, 0.86); color: #fff;
  font: 600 12.5px/1 var(--font-body); letter-spacing: 0.01em; white-space: nowrap;
  transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out), opacity 0.25s var(--ease-out);
}
.pin-flip .pin-label { left: auto; right: 13px; }
.pin.is-selected .pin-dot { transform: scale(1.2); box-shadow: 0 0 0 2.5px var(--ink), 0 0 0 4.5px var(--peach), 0 6px 12px -4px rgba(10, 3, 50, 0.7); }
.pin.is-selected .pin-label { background: var(--peach); color: var(--on-peach); }
/* Under maintenance: a hollow peach ring. Retired: a small lavender ring, named on hover. */
.pin-maint .pin-dot { background: var(--ink); box-shadow: inset 0 0 0 3px var(--peach), 0 0 0 1.5px var(--ink); }
.pin-maint .pin-label { box-shadow: inset 0 0 0 1px rgba(251, 227, 200, 0.6); }
.pin-retired .pin-dot { left: -5px; top: -5px; width: 10px; height: 10px; background: rgba(20, 11, 59, 0.6); box-shadow: inset 0 0 0 2px #ddd5ff; }
.pin-retired .pin-label { opacity: 0; color: #ddd5ff; left: 10px; }
.pin-retired.pin-flip .pin-label { left: auto; right: 10px; }
@media (prefers-reduced-motion: reduce) { .pin-dot, .pin-label { transition: none; } }
/* In a callout column a ring alone cannot be matched to a name, and phones have no hover:
   the column already keeps room for the label, so it is always shown there. */
.pin-retired.is-hover .pin-label, .pin-retired.is-selected .pin-label, .pin-retired.pin-in-callout .pin-label { opacity: 1; }
.pin-retired.is-selected .pin-label { color: var(--on-peach); }

@media (max-width: 480px) {
  .srv-card { padding: 18px 16px; }
  .state-card { padding: 18px; }
  .pin-label { font-size: 11.5px; height: 22px; top: -11px; padding: 0 6px; }
  .pick { height: 38px; padding: 0 10px; font-size: 13px; }
}

/* ------------------------------------------------------------ components */

.boards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: clamp(32px, 4vw, 48px); align-items: start; }
.boards-col { display: grid; gap: 16px; align-content: start; }
@media (max-width: 860px) { .boards { grid-template-columns: minmax(0, 1fr); } }
.board { padding: 22px 24px 12px; gap: 6px; }
.board-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 6px; }
.card .board-sum { font-size: 14px; color: var(--card-sub); }
.card .board-sum.has-bad { color: var(--bad); font-weight: 600; }
.comp { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 0; border-top: 1px solid var(--vig-line); }
.comp-main { display: grid; gap: 3px; min-width: 0; }
.comp-name { font-weight: 600; font-size: 15.5px; line-height: 1.3; overflow-wrap: anywhere; }
.comp-note { font-size: 13.5px; line-height: 1.4; color: var(--card-sub); }
.comp .status { flex: none; }
.status.warn { color: var(--bad); }
.status.maint { color: var(--ui-violet); }
.status.retired { color: var(--ui-sub); }
.card.dark .status, .panel-ink .status { color: var(--peach); }
@media (max-width: 420px) { .board { padding: 18px 16px 8px; } .comp { align-items: flex-start; } .comp .status { margin-top: 2px; } }

/* ------------------------------------------------------- maintenance panel */

.split.maint { align-items: start; }
.maint h2 { font-size: clamp(30px, 3.8vw, 52px); }
.maint .chip { margin-bottom: 18px; }
.maint-steps { margin-top: 28px; }
.maint-steps li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 4px 16px; padding: 13px 0; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 15.5px; line-height: 1.5; color: #c9bff5; }
.maint-steps b { color: #fff; font-weight: 600; }
.maint .inc-meta { margin-top: 18px; font-size: 15px; color: #c9bff5; }
.maint .intro { margin-top: 14px; }
.maint-side { display: grid; gap: 14px; align-self: center; min-width: 0; }
.maint-term { width: 100%; max-width: none; padding: 18px 20px; font-size: 13px; background: #0e0730; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.maint-aff { font-size: 14.5px; line-height: 1.5; color: #a99be6; }
@media (max-width: 480px) { .maint-steps li { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------- incidents */

.tl-card { margin-top: clamp(32px, 4vw, 48px); padding: 24px clamp(18px, 3vw, 30px) 22px; gap: 0; --tl-label: 34%; }
.tl-axis, .tl-lanes a { display: grid; grid-template-columns: var(--tl-label) minmax(0, 1fr); gap: 16px; align-items: center; }
.tl-months { position: relative; height: 24px; overflow: hidden; }
.tl-month .m-short { display: none; }
.tl-month { position: absolute; top: 0; height: 100%; padding-left: 7px; font-size: 12.5px; font-weight: 600; color: var(--card-sub); border-left: 1px solid var(--vig-line); white-space: nowrap; }
/* The tracks end on the snapshot day; a dashed line down their right edge marks it as "now". */
.tl-months::after { content: ""; position: absolute; right: 0; top: 4px; bottom: 0; border-right: 1px dashed var(--ui-violet-2); }
.tl-lanes { position: relative; margin-top: 6px; }
.tl-lanes::after { content: ""; position: absolute; right: 0; top: -6px; bottom: 0; border-right: 1px dashed var(--ui-violet-2); pointer-events: none; }
.tl-lanes a { padding: 7px 0; color: var(--card-ink); text-decoration: none; border-top: 1px solid var(--vig-line); }
.tl-lanes li:first-child a { border-top: 0; }
.tl-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; transition: color 0.3s var(--ease-out); }
.tl-lanes a:hover .tl-name { color: var(--ui-violet); }
.tl-track { position: relative; height: 12px; }
.tl-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed var(--vig-line); }
.tl-bar { position: absolute; top: 0; height: 12px; min-width: 6px; border-radius: 6px; }
.tl-open, .tl-key.tl-open { background: var(--bad); }
.tl-maint, .tl-key.tl-maint { background: repeating-linear-gradient(135deg, var(--ui-violet) 0 4px, #8f73ff 4px 7px); }
.tl-resolved, .tl-key.tl-resolved { background: var(--ui-violet-2); }
/* Start unknown: the bar fades in from the left instead of starting on a date. */
.tl-approx { -webkit-mask-image: linear-gradient(90deg, transparent, #000 min(22px, 45%)); mask-image: linear-gradient(90deg, transparent, #000 min(22px, 45%)); }
.tl-bar.tl-approx { min-width: 20px; }
.tl-bar.tl-ongoing { min-width: 24px; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--vig-line); font-size: 13px; color: var(--card-sub); }
.tl-legend li { display: inline-flex; align-items: center; gap: 8px; }
.tl-key { display: inline-block; width: 22px; height: 10px; border-radius: 5px; }
.tl-legend-now { margin-left: auto; }
.tl-key-now { display: inline-block; width: 0; height: 14px; border-right: 1px dashed var(--ui-violet-2); }
@media (max-width: 1000px) {
  .tl-axis { grid-template-columns: minmax(0, 1fr); }
  .tl-axis .tl-gap { display: none; }
  .tl-lanes a { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 10px 0; }
  .tl-name { white-space: normal; }
  .tl-months::after, .tl-lanes::after { display: none; }
  .tl-legend .tl-legend-now { display: none; }
  .tl-month .m-full { display: none; }
  .tl-month .m-short { display: inline; }
}

.index-title { display: flex; align-items: baseline; gap: 12px; }
.index-title small { font: 600 18px/1 var(--font-body); color: var(--on-field-2); }
.inc-list { display: grid; gap: 14px; margin-top: 22px; }
.inc-empty { margin-top: 16px; color: var(--on-field-2); }
.inc { scroll-margin-top: 96px; padding: 24px clamp(18px, 2.6vw, 30px); gap: 14px; }
.inc-main { display: grid; gap: 12px; align-content: start; min-width: 0; }
.inc-main > p { max-width: 66ch; }
.inc-head { display: flex; align-items: flex-start; gap: 12px; }
.inc-head h4 { font: 700 19.5px/1.25 var(--font-body); letter-spacing: -0.01em; text-wrap: balance; overflow-wrap: anywhere; }
.inc-tag { flex: none; margin-top: 1px; padding: 6px 9px; border-radius: 8px; font: 700 12.5px/1 var(--font-body); }
.tag-open { background: #fde8e9; color: #a8262b; }
.tag-maint { background: #ece7ff; color: var(--ui-violet); }
.tag-resolved { background: #e2f3e9; color: var(--ok); }
/* Every item carries a dot in the gap before it; the one that starts a line falls outside the box and is clipped. */
.inc-meta { display: flex; flex-wrap: wrap; gap: 4px 22px; overflow: hidden; }
.card .inc-meta { font-size: 14px; font-weight: 500; color: var(--card-sub); }
.inc-meta > * { position: relative; }
.inc-meta > *::before { content: ""; position: absolute; left: -13px; top: 50%; width: 4px; height: 4px; margin-top: -2px; border-radius: 50%; background: currentColor; opacity: 0.6; }
.card .inc-aff { font-size: 14px; color: var(--ui-sub); }
.inc-updates { margin-top: 2px; border-top: 1px solid var(--vig-line); }
.inc-updates li { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 2px 12px; padding: 10px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--card-sub); }
.inc-updates b { font-weight: 600; color: var(--card-ink); }
@media (min-width: 961px) {
  .inc.has-updates { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0 40px; }
  .inc.has-updates .inc-updates { margin-top: 0; padding-left: 28px; border-top: 0; border-left: 1px solid var(--vig-line); }
  .inc.has-updates .inc-updates li:first-child { padding-top: 2px; }
}
@media (max-width: 560px) { .inc-head { flex-direction: column; gap: 10px; } }
@media (max-width: 420px) { .inc-updates li { grid-template-columns: minmax(0, 1fr); } }

/* ----------------------------------------------------------------- method */

.method { align-items: start; }
.method .ticks { margin-top: 0; }
.method .ticks li { color: #f3efff; }
