:root {
  --bg: #0e1116;
  --card: #171b22;
  --line: #262c36;
  --fg: #e6edf3;
  --dim: #8b949e;
  --accent: #f6821f;   /* cloudflare orange */
  --accent2: #d97706;
  --danger: #f85149;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font: 15px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
        "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  display: grid; place-items: center; padding: 24px;
}
main { width: 100%; max-width: 460px; }
h1 { font-size: 22px; margin: 0 0 18px; letter-spacing: .5px; }
h1 .sub { font-size: 12px; color: var(--dim); font-weight: 400; letter-spacing: 2px; text-transform: uppercase; }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; display: grid; gap: 14px;
}
.field { display: grid; gap: 6px; }
.lbl { font-size: 12px; color: var(--dim); display: flex; justify-content: space-between; align-items: center; }
.lbl em { font-style: normal; font-size: 11px; opacity: .65; }
select, input[type=range] { width: 100%; }
select {
  background: #0d1117; color: var(--fg); border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 10px; font: inherit; font-size: 14px;
}
select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
input[type=range] { accent-color: var(--accent); height: 20px; }
output { font-variant-numeric: tabular-nums; color: var(--fg); font-size: 12px; }

.row { display: flex; gap: 9px; }
button {
  flex: 1; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: #1f242c; color: var(--fg); font: inherit; font-weight: 600;
  cursor: pointer; transition: .12s;
}
button:hover:not(:disabled) { border-color: #3a424e; transform: translateY(-1px); }
button:disabled { opacity: .38; cursor: not-allowed; }
button.primary { background: var(--accent); border-color: var(--accent); color: #1a1206; }
button.primary:hover:not(:disabled) { background: #ff9a3d; }
button.ghost { flex: 0 0 auto; font-weight: 400; color: var(--dim); }

.meter { height: 6px; background: #0d1117; border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2ea043, var(--accent) 70%, var(--danger)); transition: width .06s linear; }

.status { margin: 0; font-size: 12.5px; color: var(--dim); min-height: 1.4em; }
.status.live { color: #2ea043; }
.status.err { color: var(--danger); }

.warn { font-size: 12px; color: var(--dim); border-left: 2px solid var(--accent); padding-left: 10px; margin: 16px 0 0; }