/* Öffentliche Statusseite, fest hell, ohne Farbfläche. */

html[data-theme="light"] {
  color-scheme: light;
}

body[data-swift="1"]:has(.st-page) {
  background: #f6f6f8;
}

body[data-swift="1"]:has(.st-page)::before {
  display: none;
}

.st-page {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 4px 32px 72px;
  color: var(--text);
}

.st-head {
  display: flex;
  align-items: center;
  gap: 36px;
  margin: 0 0 5px;
  padding-bottom: 4px;
  border-bottom: 0.5px solid var(--border);
}

.st-logo-frame {
  position: relative;
  width: 492px;
  aspect-ratio: 1000 / 360;
  overflow: hidden;
  flex: 0 0 auto;
}

.st-logo {
  position: absolute;
  display: block;
  width: 100%;
  height: calc(100% * 520 / 360);
  max-width: none;
  left: 0;
  top: calc(100% * -80 / 360);
  background: transparent;
}

.st-head-text {
  min-width: 0;
}

.st-kicker {
  margin: 0 0 2px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.st-page h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.st-meta {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.st-search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
}

.st-refresh {
  position: relative;
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  background: rgba(142, 142, 147, 0.22);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5.5px), #000 calc(100% - 5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5.5px), #000 calc(100% - 5px));
}

.st-refresh-arc {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from -90deg, #0c2e9b, #e30613);
  -webkit-mask: conic-gradient(from -90deg, #000 var(--st-refresh, 0%), transparent 0);
  mask: conic-gradient(from -90deg, #000 var(--st-refresh, 0%), transparent 0);
}

.st-section {
  margin: 0 0 28px;
}

.st-section-head {
  margin: 0 0 12px;
}

.st-section-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.st-section-head p {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.st-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 22px;
}

.st-search {
  display: block;
  flex: 0 1 28rem;
  min-width: 0;
  margin: 0;
}

.st-controls {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.st-compact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
  user-select: none;
}

.st-compact-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.st-switch {
  position: relative;
  display: inline-block;
  width: 51px;
  height: 31px;
  flex: 0 0 auto;
}

.st-switch input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.st-switch-ui {
  display: block;
  width: 51px;
  height: 31px;
  border-radius: 16px;
  background: #e9e9eb;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.06);
  transition: background 200ms ease;
}

.st-switch-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.16), 0 0 1px rgba(0, 0, 0, 0.08);
  transition: transform 200ms ease;
}

.st-switch input:checked + .st-switch-ui {
  background: #34c759;
}

.st-switch input:checked + .st-switch-ui .st-switch-knob {
  transform: translateX(20px);
}

.st-switch input:focus-visible + .st-switch-ui {
  outline: 2px solid #007aff;
  outline-offset: 2px;
}

.st-theme {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 2px;
  border-radius: 8px;
  background: rgba(120, 120, 128, 0.12);
}

.st-theme button {
  margin: 0;
  padding: 2px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #3a3a3c;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.st-theme button[aria-pressed="true"] {
  background: #ffffff;
  color: #007aff;
}

.st-theme button:focus-visible {
  outline: 2px solid #007aff;
  outline-offset: 1px;
}

.st-sort {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  background: rgba(120, 120, 128, 0.12);
}

.st-sort button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 36px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #3a3a3c;
  cursor: pointer;
}

.st-sort button svg {
  width: 18px;
  height: 18px;
  display: block;
}

.st-sort button .st-sort-dir {
  display: none;
  width: 12px;
  height: 12px;
}

.st-sort button[aria-pressed="true"] {
  width: 46px;
  background: #ffffff;
  color: #007aff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.st-sort button[aria-pressed="true"] .st-sort-dir {
  display: block;
}

.st-sort button.is-desc .st-sort-dir {
  transform: scaleY(-1);
}

.st-sort button:focus-visible {
  outline: 2px solid #007aff;
  outline-offset: 1px;
}

.st-search-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

body[data-swift="1"] .st-search input {
  width: min(100%, 28rem);
  min-height: 40px;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid rgba(60, 60, 67, 0.16);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: none;
  font-size: 15px;
}

.st-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.st-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.st-legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #8e8e93;
}

.st-legend i.is-up { background: #34c759; }
.st-legend i.is-partial { background: #ff9f0a; }
.st-legend i.is-down { background: #ff3b30; }
.st-legend i.is-unknown { background: #8e8e93; }

.st-heat {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 18px;
}

.st-heat:empty {
  display: none;
}

.st-heat button {
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  cursor: pointer;
}

.st-heat button:focus-visible {
  outline: 2px solid #007aff;
  outline-offset: 2px;
}

.st-tip {
  position: fixed;
  z-index: 40;
  max-width: 280px;
  margin: 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: #1c1c1e;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  white-space: pre-line;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.st-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 36px;
}

.st-grid.is-compact {
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
}

.st-mini {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-height: 92px;
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  background: #8e8e93;
  color: #1c1c1e;
  text-align: left;
  cursor: pointer;
}

.st-mini.is-up { background: #34c759; }
.st-mini.is-partial { background: #ff9f0a; }
.st-mini.is-down { background: #ff3b30; color: #ffffff; }
.st-mini.is-unknown { background: #8e8e93; color: #ffffff; }

.st-mini.is-open {
  outline: 2px solid #1c1c1e;
  outline-offset: 2px;
}

.st-mini--marked::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.46);
  pointer-events: none;
}

.st-mini-id,
.st-mini-state,
.st-mini-note {
  position: relative;
  z-index: 1;
}

.st-mini-note {
  max-width: 100%;
  padding: 3px 6px;
  border: 1.5px solid rgba(140, 32, 32, 0.5);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.78);
  color: rgba(140, 32, 32, 0.92);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.st-mini-id {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  width: 100%;
}

.st-mini-name {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.st-mini-fqdn {
  font-size: 11px;
  font-weight: 550;
  line-height: 1.3;
  opacity: 0.78;
  word-break: break-all;
}

.st-mini-state {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
  opacity: 0.82;
}

.st-fly {
  position: fixed;
  z-index: 30;
  width: min(440px, calc(100vw - 24px));
  max-height: min(720px, calc(100vh - 24px));
  overflow: auto;
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.st-fly[hidden] {
  display: none;
}

.st-fly .st-card {
  height: auto;
}

.st-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
  height: 100%;
  padding: 24px 24px 48px;
  overflow: hidden;
  border: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 20px;
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.st-card--marked::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.46);
  pointer-events: none;
  z-index: 1;
}

.st-card--wide {
  grid-column: 1 / -1;
}

#st-uplink .st-card--wide {
  grid-column: auto;
}

.st-id {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.st-id-text {
  flex: 1 1 auto;
  min-width: 0;
}

.st-mark {
  display: block;
  width: 40px;
  height: 40px;
  margin-left: auto;
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: cover;
}

.st-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #f2f2f4;
  color: #3a3a3c;
}

.st-icon svg {
  width: 18px;
  height: 18px;
}

.st-icon img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.st-mark {
  border-radius: 10px;
  object-fit: contain;
  background: #fff;
}

.st-mark--empty {
  background: transparent;
}

.st-title {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.25;
  word-break: break-word;
}

.st-name-sub {
  margin: 4px 0 0;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.011em;
  line-height: 1.35;
  color: #3a3a3c;
  word-break: break-word;
}

.st-name-line {
  display: block;
  min-height: 1.35em;
}

.st-sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.st-fqdn {
  color: #007aff;
  text-decoration: none;
}

.st-fqdn:hover {
  text-decoration: underline;
}

.st-stamp {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 54%;
  width: min(88%, 26rem);
  margin: 0;
  padding: 10px 16px;
  white-space: pre-line;
  border: 2px solid rgba(140, 32, 32, 0.55);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
  color: rgba(140, 32, 32, 0.82);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
  text-align: center;
  transform: translate(-50%, -50%) rotate(-7deg);
  pointer-events: none;
}

.st-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
}

.st-scope {
  min-width: 0;
  padding: 10px 8px 9px;
  border-radius: 12px;
  background: #f3f3f5;
  text-align: center;
}

.st-scope-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.st-scope-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.st-scope-state svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.st-scope.is-up .st-scope-state { color: #1f8a3b; }
.st-scope.is-down .st-scope-state { color: #d70015; }
.st-scope.is-partial .st-scope-state { color: #c93400; }
.st-scope.is-unknown .st-scope-state { color: #8e8e93; }

.st-checks {
  margin: 6px 0 0;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.st-chain-note {
  margin: 4px 0 0;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  color: #8e8e93;
}

.st-check.is-up { color: #248a3d; }
.st-check.is-down { color: #d70015; }
.st-check.is-unknown { color: #8e8e93; }

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] body[data-swift="1"]:has(.st-page) {
  background: #1c1c1e;
}

html[data-theme="dark"] .st-page {
  color: #ffffff;
}

html[data-theme="dark"] .st-card,
html[data-theme="dark"] .st-modal-card {
  background: #2c2c2e;
  border-color: rgba(84, 84, 88, 0.65);
  color: #ffffff;
}

html[data-theme="dark"] .st-scope,
html[data-theme="dark"] .st-icon {
  background: #3a3a3c;
  color: #ffffff;
}

html[data-theme="dark"] .st-icon img {
  filter: brightness(0) invert(1);
}

html[data-theme="dark"] body[data-swift="1"] .st-search input {
  background: #2c2c2e;
  border-color: rgba(84, 84, 88, 0.65);
  color: #ffffff;
}

html[data-theme="dark"] .st-switch-ui {
  background: #39393d;
}

html[data-theme="dark"] .st-sort,
html[data-theme="dark"] .st-theme {
  background: rgba(118, 118, 128, 0.24);
}

html[data-theme="dark"] .st-sort button,
html[data-theme="dark"] .st-theme button {
  color: rgba(235, 235, 245, 0.8);
}

html[data-theme="dark"] .st-sort button[aria-pressed="true"],
html[data-theme="dark"] .st-theme button[aria-pressed="true"] {
  background: #636366;
  color: #ffffff;
}

html[data-theme="dark"] .st-title,
html[data-theme="dark"] .st-name-sub {
  color: rgba(235, 235, 245, 0.92);
}

html[data-theme="dark"] .st-mark {
  background: transparent;
}

html[data-theme="dark"] .st-fqdn,
html[data-theme="dark"] .st-ticket {
  color: #0a84ff;
}

html[data-theme="dark"] .st-ticket {
  background: #3a3a3c;
}

html[data-theme="dark"] .st-check.is-up { color: #30d158; }
html[data-theme="dark"] .st-check.is-down { color: #ff453a; }

.st-sep {
  color: var(--text-muted);
  font-weight: 500;
}

.st-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text-muted);
}

.st-ticket {
  position: absolute;
  right: 12px;
  bottom: 10px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #ffffff;
  color: #007aff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(60, 60, 67, 0.12);
  cursor: pointer;
}

.st-ticket svg {
  width: 15px;
  height: 15px;
}

.st-ticket:hover {
  background: #f2f2f7;
}

.st-ticket:focus-visible {
  outline: 2px solid #007aff;
  outline-offset: 2px;
}

.st-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
}

.st-modal[hidden] {
  display: none;
}

.st-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
}

.st-modal-card {
  position: relative;
  width: min(100%, 360px);
  margin: 0;
  padding: 22px 22px 18px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.st-modal-card h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.st-modal-service {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.st-modal-hint {
  margin: 16px 0 0;
  font-size: 15px;
  line-height: 1.4;
}

.st-modal-close {
  margin-top: 18px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: #007aff;
  color: #ffffff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.st-modal-close:focus-visible {
  outline: 2px solid #007aff;
  outline-offset: 2px;
}

@media (max-width: 800px) {
  .st-page { padding: 36px 14px 40px; }
  .st-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .st-page h1 { font-size: 28px; }
  .st-logo-frame { width: min(100%, 280px); }
  .st-tools { align-items: flex-start; flex-wrap: wrap; }
  .st-controls { flex-wrap: wrap; }
  .st-grid:not(.is-compact) { grid-template-columns: 1fr; gap: 20px; }
  .st-grid.is-compact { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .st-pills { gap: 8px; }
}

@media (max-width: 800px) and (orientation: portrait) {
  .st-head,
  .st-head-text,
  .st-section-head {
    align-items: center;
    text-align: center;
  }
  .st-head-text { width: 100%; }
  .st-legend { justify-content: center; }
}
