:root {
  --ink: #1b1712;
  --ink-2: #3a332a;
  --mute: #7a6f60;
  --paper: #f4ecda;
  --card: #fffdf8;
  --line: #e6dcc6;
  --line-2: #efe7d4;
  --red: #d61f26;
  --red-deep: #9e1218;
  --green: #1f9d57;
  --amber: #c98512;
  --radius: 10px;
  --shadow: 0 1px 0 rgba(27, 23, 18, 0.04), 0 8px 24px rgba(60, 40, 10, 0.07);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: "Noto Sans KR", system-ui, sans-serif;
  font-size: 14px;
  color: var(--ink);
  background:
    radial-gradient(900px 420px at 8% -8%, #fff8ea 0%, transparent 60%),
    linear-gradient(180deg, #f1e7d0 0%, #e4d6b8 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

/* ---------- header ---------- */
.a-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  background: rgba(244, 236, 218, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.a-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.a-brand b {
  font-family: Syne, sans-serif;
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 17px;
}

.a-brand span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--red-deep);
  border: 1px solid rgba(158, 18, 24, 0.35);
  padding: 2px 6px;
  border-radius: 4px;
}

.a-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.a-user {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--ink-2);
  padding: 6px 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
}

/* ---------- buttons ---------- */
.a-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}

.a-btn:hover {
  background: #fff;
  border-color: #cdbf9f;
}

.a-btn.primary {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff8ef;
}

.a-btn.primary:hover {
  background: var(--red-deep);
  border-color: var(--red-deep);
}

.a-btn.ghost {
  background: transparent;
}

.a-btn.wide {
  width: 100%;
}

.a-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* log switch */
.a-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--mute);
  cursor: pointer;
  user-select: none;
}

.a-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.a-switch i {
  position: relative;
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: #cfc3a8;
  transition: background 0.15s;
}

.a-switch i::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s;
}

.a-switch input:checked + i {
  background: var(--ink);
}

.a-switch input:checked + i::after {
  transform: translateX(14px);
}

/* ---------- layout ---------- */
.a-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 24px 64px;
}

#panel {
  display: grid;
  gap: 18px;
}

.a-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.a-muted {
  color: var(--mute);
  margin: 6px 0 0;
}

/* ---------- KPI ---------- */
.a-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.a-kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 16px 15px;
  display: grid;
  gap: 4px;
  min-width: 0;
}

.a-kpi span {
  font-size: 12px;
  color: var(--mute);
}

.a-kpi b {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.a-kpi small {
  font-size: 11px;
  color: var(--mute);
}

.a-kpi.live b {
  color: var(--green);
}

.a-kpi.warn b {
  color: var(--red);
}

/* ---------- toolbar ---------- */
.a-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-2);
}

.a-search {
  position: relative;
  flex: 1 1 220px;
  min-width: 180px;
  color: var(--mute);
}

.a-search svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.a-search input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 33px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  outline: none;
  color: var(--ink);
}

.a-chips {
  display: inline-flex;
  padding: 3px;
  background: var(--line-2);
  border-radius: 9px;
  gap: 2px;
}

.a-chips button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 5px 11px;
  border-radius: 7px;
  font-size: 12.5px;
  color: var(--mute);
  cursor: pointer;
}

.a-chips button.on {
  background: var(--card);
  color: var(--ink);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(27, 23, 18, 0.12);
}

#sortSel {
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  font-size: 13px;
  outline: none;
}

.a-issue {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.a-issue input {
  width: 190px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  outline: none;
}

.a-search input:focus,
.a-issue input:focus,
#sortSel:focus,
.a-form input:focus,
.a-inline input:focus {
  border-color: var(--ink);
}

/* ---------- table ---------- */
.a-head,
.a-row {
  display: grid;
  grid-template-columns: minmax(170px, 1.5fr) minmax(170px, 1.3fr) 78px 78px 78px 104px 84px 150px;
  align-items: center;
  column-gap: 14px;
}

.a-head {
  padding: 9px 16px;
  font-size: 11.5px;
  color: var(--mute);
  border-bottom: 1px solid var(--line-2);
  background: #fbf6ea;
}

.r {
  text-align: right;
}

.a-row {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line-2);
}

.a-row:last-child {
  border-bottom: 0;
}

.a-row:hover {
  background: #fffaf0;
}

.c-name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.c-name > div {
  min-width: 0;
}

.c-name strong {
  display: block;
  font-weight: 500;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.c-name small {
  display: block;
  margin-top: 1px;
  font-size: 11.5px;
  color: var(--mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dot {
  flex: none;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c9bda3;
}

.dot.on {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 157, 87, 0.18);
}

.dot.bad {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(214, 31, 38, 0.15);
}

.pill {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 10.5px;
  font-weight: 500;
  border-radius: 4px;
  vertical-align: 1px;
}

.pill.bad {
  color: var(--red-deep);
  background: rgba(214, 31, 38, 0.1);
}

.c-usage {
  min-width: 0;
}

.c-usage .bar {
  height: 6px;
  border-radius: 999px;
  background: var(--line-2);
  overflow: hidden;
}

.c-usage .bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--ink);
}

.c-usage .bar.over i {
  background: var(--red);
}

.c-usage .bar.open i {
  width: 100%;
  background: repeating-linear-gradient(90deg, #cbbf9f 0 6px, transparent 6px 10px);
}

.c-usage span {
  display: block;
  margin-top: 5px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  color: var(--ink-2);
}

.c-usage span em {
  font-style: normal;
  color: var(--mute);
}

.c-num {
  text-align: right;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12.5px;
  color: var(--ink-2);
}

.c-num.zero {
  color: #b5a98f;
}

.c-seen {
  font-size: 12.5px;
  color: var(--ink-2);
}

.c-seen.never {
  color: #b5a98f;
}

.c-rate {
  display: flex;
  flex-direction: column;
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--green);
  white-space: nowrap;
}

.c-rate:not(:has(span)) {
  color: #b5a98f;
}

.c-act {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.c-act button {
  white-space: nowrap;
  appearance: none;
  border: 0;
  background: transparent;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--ink-2);
  cursor: pointer;
}

.c-act button:hover {
  background: var(--line-2);
}

.c-act .danger {
  color: var(--red-deep);
}

.c-act .danger:hover {
  background: rgba(214, 31, 38, 0.1);
}

.a-empty {
  margin: 0;
  padding: 36px 16px;
  text-align: center;
  color: var(--mute);
}

.a-foot {
  margin: 0;
  padding: 12px 16px;
  font-size: 11.5px;
  color: var(--mute);
  border-top: 1px solid var(--line-2);
}

/* ---------- gate / forms ---------- */
.a-gate {
  max-width: 400px;
  margin: 60px auto;
  padding: 28px;
}

.a-gate h1 {
  margin: 0;
  font-size: 20px;
}

.a-form {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

.a-form label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--mute);
}

.a-form input {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}

.a-msg {
  min-height: 18px;
  margin: 0;
  font-size: 12.5px;
  color: var(--red-deep);
}

/* ---------- dialogs ---------- */
.a-dlg {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
}

.a-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(27, 23, 18, 0.45);
  backdrop-filter: blur(2px);
  cursor: default;
}

.a-modal {
  position: relative;
  width: min(400px, 100%);
  display: grid;
  gap: 14px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(40, 24, 8, 0.3);
}

.a-modal.wide {
  width: min(560px, 100%);
}

.a-modal h2 {
  margin: 0;
  font-size: 18px;
}

.a-modal .a-muted {
  margin: -8px 0 0;
}

.a-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.a-inline {
  display: flex;
  align-items: center;
  gap: 8px;
}

.a-inline input {
  flex: 1;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  outline: none;
}

.a-inline span {
  color: var(--mute);
}

.a-log {
  max-height: 50vh;
  overflow-y: auto;
  border: 1px solid var(--line-2);
  border-radius: 8px;
}

.a-log .a-empty {
  padding: 24px 12px;
}

.a-log-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line-2);
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.a-log-row:last-child {
  border-bottom: 0;
}

.a-log-row span:first-child {
  color: var(--mute);
  white-space: nowrap;
}

.a-log-row span:last-child {
  word-break: break-all;
  text-align: right;
}

/* ---------- responsive ---------- */
@media (max-width: 1120px) {
  .a-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .a-head {
    display: none;
  }

  .a-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 10px;
    padding: 14px 16px;
  }

  .c-name {
    grid-column: 1 / -1;
  }

  .c-usage {
    grid-column: 1 / -1;
  }

  .c-num,
  .c-seen,
  .c-rate {
    text-align: left;
  }

  .c-rate {
    grid-column: 1 / -1;
  }

  .c-num::before,
  .c-seen::before,
  .c-rate::before {
    content: attr(data-label);
    display: block;
    font-family: "Noto Sans KR", sans-serif;
    font-size: 11px;
    color: var(--mute);
    margin-bottom: 1px;
  }

  .c-act {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-left: -8px;
  }

  .a-issue {
    margin-left: 0;
    width: 100%;
  }

  .a-issue input {
    flex: 1;
    width: auto;
  }
}

@media (max-width: 640px) {
  .a-top {
    padding: 10px 14px;
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .a-right {
    width: 100%;
    justify-content: flex-end;
    gap: 8px;
  }

  .a-switch {
    margin-right: auto;
    white-space: nowrap;
  }

  .a-main {
    padding: 16px 12px 48px;
  }

  .a-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .a-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .a-user {
    display: none;
  }

  .a-chips {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }
}


/* ---------- tabs ---------- */
.a-tabs {
  display: inline-flex;
  padding: 3px;
  background: rgba(27, 23, 18, 0.07);
  border-radius: 10px;
  gap: 2px;
  justify-self: start;
}

.a-tabs button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 13.5px;
  color: var(--mute);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.a-tabs button.on {
  background: var(--card);
  color: var(--ink);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(27, 23, 18, 0.14);
}

.a-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  color: #fff;
  background: var(--amber);
}

.a-badge.crit {
  background: var(--red);
}

#view-keys,
#view-server {
  display: grid;
  gap: 18px;
}

/* ---------- alerts ---------- */
.a-alerts {
  padding: 6px 18px;
}

.a-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 13.5px;
}

.a-alert:last-child {
  border-bottom: 0;
}

.a-alert .dot {
  margin-top: 5px;
}

.a-alert.warn .dot {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(201, 133, 18, 0.18);
}

.a-alert .lv {
  flex: none;
  min-width: 34px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--mute);
  padding-top: 2px;
}

.a-alert.crit .lv {
  color: var(--red-deep);
}

.a-alert.warn .lv {
  color: #8a5a07;
}

/* a critical alert jumps above the dashboard (#view-server is a grid) */
.a-alerts.has-crit {
  order: -1;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(214, 31, 38, 0.12);
}

.a-alert-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0 4px;
}

.a-alert-head h3 {
  margin: 0;
  font-size: 14px;
}

.a-alert-head small {
  font-weight: 400;
  color: var(--mute);
}

.a-alert-head > div {
  display: flex;
  gap: 6px;
}

.a-btn.sm {
  padding: 4px 10px;
  font-size: 12px;
}

.a-alert .tx {
  flex: 1;
  min-width: 0;
}

.a-alert .when {
  flex: none;
  padding-top: 2px;
  font-size: 11.5px;
  color: var(--mute);
  white-space: nowrap;
}

.a-x,
.a-x-gap {
  flex: none;
  width: 22px;
  height: 22px;
}

.a-x {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--mute);
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.a-x:hover {
  background: var(--line-2);
  color: var(--ink);
}

.a-history {
  margin: 6px 0 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line-2);
}

.a-history[hidden] {
  display: none;
}

.a-history .a-muted {
  margin: 0 0 4px;
  font-size: 12px;
}

.a-alert.past {
  opacity: 0.72;
}

@media (max-width: 640px) {
  .a-alert {
    flex-wrap: wrap;
  }

  .a-alert .when {
    order: 5;
    width: 100%;
    padding-left: 54px;
  }
}

.a-alert-ok {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  color: var(--ink-2);
}

/* ---------- service chips ---------- */
.a-svc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.a-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
}

.a-chip small {
  color: var(--mute);
  font-size: 11.5px;
}

.a-chip.down {
  border-color: rgba(214, 31, 38, 0.4);
  background: rgba(214, 31, 38, 0.06);
}

/* ---------- server KPI grid ---------- */
.a-srv {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

@media (max-width: 1120px) {
  .a-srv {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .a-srv {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.a-kpi.warn b {
  color: var(--amber);
}

.a-kpi.crit b {
  color: var(--red);
}

.a-kpi.good b {
  color: var(--green);
}

/* ---------- charts ---------- */
.a-charts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.a-chart {
  padding: 14px 16px 10px;
}

.a-chart h3 {
  margin: 0 0 8px;
  font-size: 13.5px;
  font-weight: 500;
}

.a-chart h3 small {
  margin-left: 6px;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--mute);
}

.a-chart svg,
.a-chart-inline svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.a-chart .axis,
.a-chart-inline .axis {
  stroke: var(--line);
  stroke-width: 1;
}

.a-chart .grid,
.a-chart-inline .grid {
  stroke: var(--line-2);
  stroke-width: 1;
}

.a-chart text,
.a-chart-inline text {
  font-family: "IBM Plex Mono", monospace;
  font-size: 9.5px;
  fill: var(--mute);
}

.a-chart .bar,
.a-chart-inline .bar {
  fill: var(--ink);
  opacity: 0.88;
}

.a-chart .bar:hover,
.a-chart-inline .bar:hover {
  fill: var(--red);
}

.a-chart .bar.fast,
.a-chart-inline .bar.fast {
  fill: var(--green);
  opacity: 1;
}

.a-chart .bar.slow,
.a-chart-inline .bar.slow {
  fill: var(--red);
  opacity: 0.85;
}

.a-pattern {
  padding: 14px 16px 12px;
}

.a-pattern[hidden] {
  display: none;
}

.a-pattern h3 {
  margin: 0 0 8px;
  font-size: 13.5px;
  font-weight: 500;
}

.a-pattern h3 small {
  margin-left: 6px;
  font-size: 11.5px;
  font-weight: 400;
  color: var(--mute);
}

.a-pattern h4 {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
}

.a-pat-sum {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-bottom: 12px;
  font-size: 13px;
}

.a-pat-sum span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.a-pat-sum i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
}

.a-pat-sum .slow i {
  background: var(--red);
}

.a-pat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 760px) {
  .a-pat-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.a-chart .line-a,
.a-chart-inline .line-a {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.6;
}

.a-chart .line-b,
.a-chart-inline .line-b {
  fill: none;
  stroke: var(--green);
  stroke-width: 1.6;
}

.a-chart .thr,
.a-chart-inline .thr {
  stroke: var(--red);
  stroke-width: 1;
  stroke-dasharray: 4 3;
}

.a-chart .empty,
.a-chart-inline .empty {
  font-size: 12px;
  fill: var(--mute);
}

.a-chart-inline .a-legend,
.a-legend {
  display: flex;
  gap: 12px;
  font-size: 11.5px;
  color: var(--mute);
  margin: -2px 0 4px;
}

.a-legend i {
  display: inline-block;
  width: 10px;
  height: 3px;
  margin-right: 5px;
  vertical-align: middle;
  border-radius: 2px;
}

.a-foot-plain {
  border-top: 0;
  padding-left: 2px;
}

@media (max-width: 1120px) {
  .a-charts {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* ---------- China reachability ---------- */
.a-cn {
  padding: 16px 18px 14px;
  display: grid;
  gap: 14px;
}

.a-cn-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.a-cn-verdict {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  background: rgba(27, 23, 18, 0.07);
}

.a-cn-verdict.ok {
  color: #146b3a;
  background: rgba(31, 157, 87, 0.13);
}

.a-cn-verdict.degraded {
  color: #8a5a07;
  background: rgba(201, 133, 18, 0.16);
}

.a-cn-verdict.blocked {
  color: var(--red-deep);
  background: rgba(214, 31, 38, 0.12);
}

.a-cn-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.a-cn-head small {
  color: var(--mute);
  font-size: 12px;
}

.a-cn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.a-cn-cell {
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 10px 12px;
  display: grid;
  gap: 3px;
  background: #fffbf3;
  min-width: 0;
}

.a-cn-cell span {
  font-size: 11.5px;
  color: var(--mute);
}

.a-cn-cell b {
  font-family: "IBM Plex Mono", monospace;
  font-size: 17px;
  font-weight: 500;
}

.a-cn-cell small {
  font-size: 11.5px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

.a-cn-cell.ok b {
  color: var(--green);
}

.a-cn-cell.warn b {
  color: var(--amber);
}

.a-cn-cell.bad b {
  color: var(--red);
}

.a-carriers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.a-carrier {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--line-2);
  color: var(--ink-2);
}

.a-carrier.bad {
  background: rgba(214, 31, 38, 0.12);
  color: var(--red-deep);
}

.a-carrier.warn {
  background: rgba(201, 133, 18, 0.16);
  color: #8a5a07;
}

.a-carrier.ok {
  background: rgba(31, 157, 87, 0.13);
  color: #146b3a;
}

.a-events {
  display: grid;
  gap: 4px;
  font-size: 12.5px;
  color: var(--ink-2);
}

.a-events div {
  display: flex;
  gap: 10px;
}

.a-events time {
  flex: none;
  color: var(--mute);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11.5px;
}

.a-chart .line-c {
  fill: none;
  stroke: #b5a98f;
  stroke-width: 1.4;
  stroke-dasharray: 3 3;
}

.a-chart-inline {
  border: 1px solid var(--line-2);
  border-radius: 8px;
  padding: 8px 10px 4px;
  background: #fffbf3;
}

.a-fo {
  padding: 16px 18px 14px;
  display: grid;
  gap: 12px;
}

.a-fo-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.a-fo-head h3 {
  margin: 0;
  font-size: 15px;
}

.a-fo-head small {
  color: var(--mute);
}

.a-fo-state {
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}

.a-fo-state.primary {
  color: #146b3a;
  background: rgba(31, 157, 87, 0.13);
}

.a-fo-state.standby {
  color: #a35a00;
  background: rgba(230, 140, 0, 0.16);
}

.a-fo-checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 16px;
  font-size: 13px;
}

.a-fo-checks li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--mute);
}

.a-fo-checks li i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(27, 23, 18, 0.2);
  flex: none;
}

.a-fo-checks li.ok {
  color: inherit;
}

.a-fo-checks li.ok i {
  background: var(--green);
}

.a-fo-checks li.no i {
  background: rgba(27, 23, 18, 0.2);
}

.a-fo-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.a-fo-actions small {
  color: var(--mute);
}

#rateRange {
  margin: 4px 0 10px;
  width: fit-content;
}

#rateSummary {
  margin: 6px 0 14px;
  font-size: 12.5px;
}

.a-more {
  position: relative;
}

.c-act .more {
  border: 1px solid var(--line);
}

.a-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 124px;
  padding: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 20;
}

.a-menu.up {
  top: auto;
  bottom: calc(100% + 4px);
}

.c-act .a-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
}

.c-act .a-menu .danger {
  margin-top: 4px;
  border-top: 1px solid var(--line-2);
  border-radius: 0 0 6px 6px;
}

@media (max-width: 1120px) {
  .a-menu {
    right: auto;
    left: 0;
  }
}
